diff mbox

[net,v2] ip_tunnel: Initialize the fallback device properly

Message ID 20140519093656.GE32371@secunet.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Steffen Klassert May 19, 2014, 9:36 a.m. UTC
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>
---

v2: Add a reference to the commit that added the bug.
    No code changes since v1.

 net/ipv4/ip_tunnel.c |    1 +
 1 file changed, 1 insertion(+)

Comments

David Miller May 21, 2014, 6:09 a.m. UTC | #1
From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Mon, 19 May 2014 11:36:56 +0200

> 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>
> ---
> 
> v2: Add a reference to the commit that added the bug.
>     No code changes since v1.

Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index 49721d7..2acc233 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/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)) {
 		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();