Skip to content

Commit

Permalink
net: gain ipv4 mtu when mtu is not locked
Browse files Browse the repository at this point in the history
When mtu is locked, we should not obtain ipv4 mtu as we return immediately
in this case and leave acquired ipv4 mtu unused.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Miaohe Lin authored and David S. Miller committed Aug 25, 2020
1 parent 079f921 commit 8b4510d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,13 +1013,14 @@ out: kfree_skb(skb);
static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu)
{
struct dst_entry *dst = &rt->dst;
u32 old_mtu = ipv4_mtu(dst);
struct fib_result res;
bool lock = false;
u32 old_mtu;

if (ip_mtu_locked(dst))
return;

old_mtu = ipv4_mtu(dst);
if (old_mtu < mtu)
return;

Expand Down

0 comments on commit 8b4510d

Please sign in to comment.