]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ipv4: reset fnhe_mtu_locked after cache route flushed
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 9 May 2018 10:06:44 +0000 (18:06 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 May 2018 19:40:52 +0000 (15:40 -0400)
After route cache is flushed via ipv4_sysctl_rtcache_flush(), we forget
to reset fnhe_mtu_locked in rt_bind_exception(). When pmtu is updated
in __ip_rt_update_pmtu(), it will return directly since the pmtu is
still locked. e.g.

+ ip netns exec client ping 10.10.1.1 -c 1 -s 1400 -M do
PING 10.10.1.1 (10.10.1.1) 1400(1428) bytes of data.
>From 10.10.0.254 icmp_seq=1 Frag needed and DF set (mtu = 0)

Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c

index 1412a7baf0b9c214d4ae006abb306b499369a09e..29268efad24777b6839923e25d7bf138c9cf0643 100644 (file)
@@ -1375,6 +1375,7 @@ static bool rt_bind_exception(struct rtable *rt, struct fib_nh_exception *fnhe,
                        fnhe->fnhe_gw = 0;
                        fnhe->fnhe_pmtu = 0;
                        fnhe->fnhe_expires = 0;
+                       fnhe->fnhe_mtu_locked = false;
                        fnhe_flush_routes(fnhe);
                        orig = NULL;
                }