]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: igmp: guard against silly MTU values
authorEric Dumazet <edumazet@google.com>
Mon, 11 Dec 2017 15:17:39 +0000 (07:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Dec 2017 18:13:58 +0000 (13:13 -0500)
commitdeb82666172dd274bc1c44f9b7464da60738e526
tree93662637d298a843940b42d54ca36326f456db95
parent74db3ed44ac113cdbf6f537d721c8787b3337372
ipv4: igmp: guard against silly MTU values

IPv4 stack reacts to changes to small MTU, by disabling itself under
RTNL.

But there is a window where threads not using RTNL can see a wrong
device mtu. This can lead to surprises, in igmp code where it is
assumed the mtu is suitable.

Fix this by reading device mtu once and checking IPv4 minimal MTU.

This patch adds missing IPV4_MIN_MTU define, to not abuse
ETH_MIN_MTU anymore.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h
net/ipv4/devinet.c
net/ipv4/igmp.c
net/ipv4/ip_tunnel.c