浏览代码

ip_tunnel: Initialize the fallback device properly

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>
Steffen Klassert 11 年之前
父节点
当前提交
78ff4be45a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      net/ipv4/ip_tunnel.c

+ 1 - 0
net/ipv4/ip_tunnel.c

@@ -883,6 +883,7 @@ int ip_tunnel_init_net(struct net *net, int ip_tnl_net_id,
 	 */
 	 */
 	if (!IS_ERR(itn->fb_tunnel_dev)) {
 	if (!IS_ERR(itn->fb_tunnel_dev)) {
 		itn->fb_tunnel_dev->features |= NETIF_F_NETNS_LOCAL;
 		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));
 		ip_tunnel_add(itn, netdev_priv(itn->fb_tunnel_dev));
 	}
 	}
 	rtnl_unlock();
 	rtnl_unlock();