ip_tunnel: Initialize the fallback device properly
authorSteffen Klassert <steffen.klassert@secunet.com>
Mon, 19 May 2014 09:36:56 +0000 (11:36 +0200)
committerJiri Slaby <jslaby@suse.cz>
Thu, 29 May 2014 09:49:33 +0000 (11:49 +0200)
[ Upstream commit 78ff4be45a4c51d8fb21ad92e4fabb467c6c3eeb ]

We need to initialize the fallback device to have a correct mtu
set on this device. Otherwise the mtu is set to null and the device
is unusable.

Fixes: fd58156e456d ("IPIP: Use ip-tunneling code.")
Cc: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/ipv4/ip_tunnel.c

index d626d4059a4203d2c22d764bea69018eeb729b47..d9dbe0f786127de2c4e573fb1308c680ddc3c06d 100644 (file)
@@ -855,6 +855,7 @@ int ip_tunnel_init_net(struct net *net, int ip_tnl_net_id,
         */
        if (!IS_ERR(itn->fb_tunnel_dev)) {
                itn->fb_tunnel_dev->features |= NETIF_F_NETNS_LOCAL;
+               itn->fb_tunnel_dev->mtu = ip_tunnel_bind_dev(itn->fb_tunnel_dev);
                ip_tunnel_add(itn, netdev_priv(itn->fb_tunnel_dev));
        }
        rtnl_unlock();