aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/ip_gre.c2
-rw-r--r--net/ipv4/ipip.c2
-rw-r--r--net/ipv6/ip6_tunnel.c2
-rw-r--r--net/ipv6/sit.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index bf5b338f134..0101521f366 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -1268,9 +1268,9 @@ static int ipgre_init_net(struct net *net)
err = -ENOMEM;
goto err_alloc_dev;
}
+ dev_net_set(ign->fb_tunnel_dev, net);
ipgre_fb_tunnel_init(ign->fb_tunnel_dev);
- dev_net_set(ign->fb_tunnel_dev, net);
ign->fb_tunnel_dev->rtnl_link_ops = &ipgre_link_ops;
if ((err = register_netdev(ign->fb_tunnel_dev)))
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index 9eb437cb821..5079dfbc6f3 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -793,9 +793,9 @@ static int ipip_init_net(struct net *net)
err = -ENOMEM;
goto err_alloc_dev;
}
+ dev_net_set(ipn->fb_tunnel_dev, net);
ipip_fb_tunnel_init(ipn->fb_tunnel_dev);
- dev_net_set(ipn->fb_tunnel_dev, net);
if ((err = register_netdev(ipn->fb_tunnel_dev)))
goto err_reg_dev;
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 358f001d848..ef249ab5c93 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1428,9 +1428,9 @@ static int ip6_tnl_init_net(struct net *net)
if (!ip6n->fb_tnl_dev)
goto err_alloc_dev;
+ dev_net_set(ip6n->fb_tnl_dev, net);
ip6_fb_tnl_dev_init(ip6n->fb_tnl_dev);
- dev_net_set(ip6n->fb_tnl_dev, net);
err = register_netdev(ip6n->fb_tnl_dev);
if (err < 0)
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 1ebf99a6776..d3467e563f0 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1025,9 +1025,9 @@ static int sit_init_net(struct net *net)
err = -ENOMEM;
goto err_alloc_dev;
}
+ dev_net_set(sitn->fb_tunnel_dev, net);
ipip6_fb_tunnel_init(sitn->fb_tunnel_dev);
- dev_net_set(sitn->fb_tunnel_dev, net);
if ((err = register_netdev(sitn->fb_tunnel_dev)))
goto err_reg_dev;