Commit 1dbe325
net: use loopback dev when generating blackhole route
Existing ipv4/6_blackhole_route() code generates a blackhole route
with dst->dev pointing to the passed in dst->dev.
It is not necessary to hold reference to the passed in dst->dev
because the packets going through this route are dropped anyway.
A loopback interface is good enough so that we don't need to worry about
releasing this dst->dev when this dev is going down.
Signed-off-by: Wei Wang <weiwan@google.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent d24406c commit 1dbe325
2 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2504 | 2504 | | |
2505 | 2505 | | |
2506 | 2506 | | |
2507 | | - | |
| 2507 | + | |
2508 | 2508 | | |
2509 | 2509 | | |
2510 | 2510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1245 | 1245 | | |
1246 | 1246 | | |
1247 | 1247 | | |
| 1248 | + | |
1248 | 1249 | | |
1249 | 1250 | | |
1250 | | - | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
1251 | 1254 | | |
1252 | 1255 | | |
1253 | 1256 | | |
| |||
1257 | 1260 | | |
1258 | 1261 | | |
1259 | 1262 | | |
1260 | | - | |
1261 | | - | |
1262 | | - | |
1263 | 1263 | | |
| 1264 | + | |
1264 | 1265 | | |
1265 | 1266 | | |
1266 | 1267 | | |
| |||
0 commit comments