ip_gre: fix IFLA_MTU ignored on NEWLINK
authorXin Long <lucien.xin@gmail.com>
Tue, 27 Feb 2018 11:19:39 +0000 (19:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:05 +0000 (07:52 +0200)
commit29764acd50d33678883b1955334040bef563cd11
tree0f0428947c2b106ad11722be14f3374310f75e39
parentf07b6505f474a108326ebb99018c0036c789c153
ip_gre: fix IFLA_MTU ignored on NEWLINK

[ Upstream commit ffc2b6ee417435605ee8bb1eb4c8f02e9ff4b4a5 ]

It's safe to remove the setting of dev's needed_headroom and mtu in
__gre_tunnel_init, as discussed in [1], ip_tunnel_newlink can do it
properly.

Now Eric noticed that it could cover the mtu value set in do_setlink
when creating a ip_gre dev. It makes IFLA_MTU param not take effect.

So this patch is to remove them to make IFLA_MTU work, as in other
ipv4 tunnels.

  [1]: https://patchwork.ozlabs.org/patch/823504/

Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.")
Reported-by: Eric Garver <e@erig.me>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_gre.c