summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorMahesh Bandewar <maheshb@google.com>2019-07-01 17:38:57 -0400
committerDavid S. Miller <davem@davemloft.net>2019-07-01 22:34:46 -0400
commit8d7017fd621d02ff0d47d19484350c2356828483 (patch)
tree50a9602573c42c05fda4e01447f06483ccf7b68a /net/ipv4
parent4de83b88c66a1e4dba426b29766fb68e61d93792 (diff)
blackhole_netdev: use blackhole_netdev to invalidate dst entries
Use blackhole_netdev instead of 'lo' device with lower MTU when marking dst "dead". Signed-off-by: Mahesh Bandewar <maheshb@google.com> Tested-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/route.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index bbd55c7f6b2e..dc1f510a7c81 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1532,7 +1532,6 @@ static void ipv4_dst_destroy(struct dst_entry *dst)
1532 1532
1533void rt_flush_dev(struct net_device *dev) 1533void rt_flush_dev(struct net_device *dev)
1534{ 1534{
1535 struct net *net = dev_net(dev);
1536 struct rtable *rt; 1535 struct rtable *rt;
1537 int cpu; 1536 int cpu;
1538 1537
@@ -1543,7 +1542,7 @@ void rt_flush_dev(struct net_device *dev)
1543 list_for_each_entry(rt, &ul->head, rt_uncached) { 1542 list_for_each_entry(rt, &ul->head, rt_uncached) {
1544 if (rt->dst.dev != dev) 1543 if (rt->dst.dev != dev)
1545 continue; 1544 continue;
1546 rt->dst.dev = net->loopback_dev; 1545 rt->dst.dev = blackhole_netdev;
1547 dev_hold(rt->dst.dev); 1546 dev_hold(rt->dst.dev);
1548 dev_put(dev); 1547 dev_put(dev);
1549 } 1548 }