]> git.baikalelectronics.ru Git - kernel.git/commit
ip6_tunnel: allow ip6gre dev mtu to be set below 1280
authorXin Long <lucien.xin@gmail.com>
Mon, 25 Dec 2017 06:45:12 +0000 (14:45 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jan 2018 17:36:14 +0000 (12:36 -0500)
commita9a52f438537c69580afa52930c73156ebb08ed7
tree524c2182f1844a51abcf58e321094fc97f93edbc
parent483aabf41299b6f6bd22afae030c8d55969ccdae
ip6_tunnel: allow ip6gre dev mtu to be set below 1280

Commit a187ec06a6b7 ("ipv6: Allow the MTU of ipip6 tunnel to be set
below 1280") fixed a mtu setting issue. It works for ipip6 tunnel.

But ip6gre dev updates the mtu also with ip6_tnl_change_mtu. Since
the inner packet over ip6gre can be ipv4 and it's mtu should also
be allowed to set below 1280, the same issue also exists on ip6gre.

This patch is to fix it by simply changing to check if parms.proto
is IPPROTO_IPV6 in ip6_tnl_change_mtu instead, to make ip6gre to
go to 'else' branch.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_tunnel.c