Skip to contentSkip to conversation

ip_tunnel: Initialize the fallback device properly

PATCH Superseded Steffen Klassert 2 participants 3 messages May 15, 2014 – May 19, 2014

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 net/ipv4/ip_tunnel.c |    1 +
 1 file changed, 1 insertion(+)
net/ipv4/ip_tunnel.c +1 -0
index b3f8597..25b8997 100644
@@ -882,6 +882,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();
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 14 lines · Steffen Klassert

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.

---
 net/ipv4/ip_tunnel.c |    1 +
 1 file changed, 1 insertion(+)
net/ipv4/ip_tunnel.c +0 -0
index b3f8597..25b8997 100644

net/ipv4/ip_tunnel.c int ip_tunnel_init_net(struct net *net, int ip_tnl_net_id, · line 888

Quoted 7 lines
net/ipv4/ip_tunnel.c +1 -0
@@ -882,6 +882,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();

Hi Steffen.

It would be nice if you also added the reference of the commit adding the bug ;)

Thanks !

#2 lore raw

Hi Eric.

Quoted 6 lines · Eric Dumazet

Hi Steffen.

It would be nice if you also added the reference of the commit adding the bug ;)

Will do that with a v2 patch :)