Skip to content

Commit 0e8411e

Browse files
liuhangbindavem330
authored andcommitted
ipv4: reset fnhe_mtu_locked after cache route flushed
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 <[email protected]>
1 parent 55be9f2 commit 0e8411e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/ipv4/route.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,7 @@ static bool rt_bind_exception(struct rtable *rt, struct fib_nh_exception *fnhe,
13751375
fnhe->fnhe_gw = 0;
13761376
fnhe->fnhe_pmtu = 0;
13771377
fnhe->fnhe_expires = 0;
1378+
fnhe->fnhe_mtu_locked = false;
13781379
fnhe_flush_routes(fnhe);
13791380
orig = NULL;
13801381
}

0 commit comments

Comments
 (0)