diff options
Diffstat (limited to 'net/ipv6/ip6_gre.c')
-rw-r--r-- | net/ipv6/ip6_gre.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index ecd60733e5e2..f2d0a42f8057 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c | |||
@@ -335,6 +335,7 @@ static struct ip6_tnl *ip6gre_tunnel_locate(struct net *net, | |||
335 | dev->rtnl_link_ops = &ip6gre_link_ops; | 335 | dev->rtnl_link_ops = &ip6gre_link_ops; |
336 | 336 | ||
337 | nt->dev = dev; | 337 | nt->dev = dev; |
338 | nt->net = dev_net(dev); | ||
338 | ip6gre_tnl_link_config(nt, 1); | 339 | ip6gre_tnl_link_config(nt, 1); |
339 | 340 | ||
340 | if (register_netdevice(dev) < 0) | 341 | if (register_netdevice(dev) < 0) |
@@ -1255,6 +1256,7 @@ static int ip6gre_tunnel_init(struct net_device *dev) | |||
1255 | tunnel = netdev_priv(dev); | 1256 | tunnel = netdev_priv(dev); |
1256 | 1257 | ||
1257 | tunnel->dev = dev; | 1258 | tunnel->dev = dev; |
1259 | tunnel->net = dev_net(dev); | ||
1258 | strcpy(tunnel->parms.name, dev->name); | 1260 | strcpy(tunnel->parms.name, dev->name); |
1259 | 1261 | ||
1260 | memcpy(dev->dev_addr, &tunnel->parms.laddr, sizeof(struct in6_addr)); | 1262 | memcpy(dev->dev_addr, &tunnel->parms.laddr, sizeof(struct in6_addr)); |
@@ -1275,6 +1277,7 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev) | |||
1275 | struct ip6_tnl *tunnel = netdev_priv(dev); | 1277 | struct ip6_tnl *tunnel = netdev_priv(dev); |
1276 | 1278 | ||
1277 | tunnel->dev = dev; | 1279 | tunnel->dev = dev; |
1280 | tunnel->net = dev_net(dev); | ||
1278 | strcpy(tunnel->parms.name, dev->name); | 1281 | strcpy(tunnel->parms.name, dev->name); |
1279 | 1282 | ||
1280 | tunnel->hlen = sizeof(struct ipv6hdr) + 4; | 1283 | tunnel->hlen = sizeof(struct ipv6hdr) + 4; |
@@ -1450,6 +1453,7 @@ static int ip6gre_tap_init(struct net_device *dev) | |||
1450 | tunnel = netdev_priv(dev); | 1453 | tunnel = netdev_priv(dev); |
1451 | 1454 | ||
1452 | tunnel->dev = dev; | 1455 | tunnel->dev = dev; |
1456 | tunnel->net = dev_net(dev); | ||
1453 | strcpy(tunnel->parms.name, dev->name); | 1457 | strcpy(tunnel->parms.name, dev->name); |
1454 | 1458 | ||
1455 | ip6gre_tnl_link_config(tunnel, 1); | 1459 | ip6gre_tnl_link_config(tunnel, 1); |
@@ -1501,6 +1505,7 @@ static int ip6gre_newlink(struct net *src_net, struct net_device *dev, | |||
1501 | eth_hw_addr_random(dev); | 1505 | eth_hw_addr_random(dev); |
1502 | 1506 | ||
1503 | nt->dev = dev; | 1507 | nt->dev = dev; |
1508 | nt->net = dev_net(dev); | ||
1504 | ip6gre_tnl_link_config(nt, !tb[IFLA_MTU]); | 1509 | ip6gre_tnl_link_config(nt, !tb[IFLA_MTU]); |
1505 | 1510 | ||
1506 | /* Can use a lockless transmit, unless we generate output sequences */ | 1511 | /* Can use a lockless transmit, unless we generate output sequences */ |