ip_tunnel: Clamp MTU to bounds on new link
authorStefano Brivio <sbrivio@redhat.com>
Thu, 15 Mar 2018 16:16:28 +0000 (17:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:16 +0000 (07:52 +0200)
commit34b6ba622ac4d5f08238771603de1ff45a2722a0
tree50e17ed71824f58ca48287037dfff54dffb98938
parente675b292c282e4b9798f5e849983ea1fb03a0b37
ip_tunnel: Clamp MTU to bounds on new link

[ Upstream commit 24fc79798b8ddfd46f2dd363a8d29072c083b977 ]

Otherwise, it's possible to specify invalid MTU values directly
on creation of a link (via 'ip link add'). This is already
prevented on subsequent MTU changes by commit b96f9afee4eb
("ipv4/6: use core net MTU range checking").

Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Acked-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_tunnel.c