diff options
Diffstat (limited to 'net/ipv6/ip6_tunnel.c')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 36c2842a86b..4e6922f1c68 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
41 | 41 | ||
42 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
43 | #include <asm/atomic.h> | 43 | #include <linux/atomic.h> |
44 | 44 | ||
45 | #include <net/icmp.h> | 45 | #include <net/icmp.h> |
46 | #include <net/ip.h> | 46 | #include <net/ip.h> |
@@ -289,6 +289,8 @@ static struct ip6_tnl *ip6_tnl_create(struct net *net, struct ip6_tnl_parm *p) | |||
289 | if ((err = register_netdevice(dev)) < 0) | 289 | if ((err = register_netdevice(dev)) < 0) |
290 | goto failed_free; | 290 | goto failed_free; |
291 | 291 | ||
292 | strcpy(t->parms.name, dev->name); | ||
293 | |||
292 | dev_hold(dev); | 294 | dev_hold(dev); |
293 | ip6_tnl_link(ip6n, t); | 295 | ip6_tnl_link(ip6n, t); |
294 | return t; | 296 | return t; |
@@ -1397,7 +1399,6 @@ ip6_tnl_dev_init_gen(struct net_device *dev) | |||
1397 | struct ip6_tnl *t = netdev_priv(dev); | 1399 | struct ip6_tnl *t = netdev_priv(dev); |
1398 | 1400 | ||
1399 | t->dev = dev; | 1401 | t->dev = dev; |
1400 | strcpy(t->parms.name, dev->name); | ||
1401 | dev->tstats = alloc_percpu(struct pcpu_tstats); | 1402 | dev->tstats = alloc_percpu(struct pcpu_tstats); |
1402 | if (!dev->tstats) | 1403 | if (!dev->tstats) |
1403 | return -ENOMEM; | 1404 | return -ENOMEM; |
@@ -1477,6 +1478,7 @@ static void __net_exit ip6_tnl_destroy_tunnels(struct ip6_tnl_net *ip6n) | |||
1477 | static int __net_init ip6_tnl_init_net(struct net *net) | 1478 | static int __net_init ip6_tnl_init_net(struct net *net) |
1478 | { | 1479 | { |
1479 | struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); | 1480 | struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); |
1481 | struct ip6_tnl *t = NULL; | ||
1480 | int err; | 1482 | int err; |
1481 | 1483 | ||
1482 | ip6n->tnls[0] = ip6n->tnls_wc; | 1484 | ip6n->tnls[0] = ip6n->tnls_wc; |
@@ -1497,6 +1499,10 @@ static int __net_init ip6_tnl_init_net(struct net *net) | |||
1497 | err = register_netdev(ip6n->fb_tnl_dev); | 1499 | err = register_netdev(ip6n->fb_tnl_dev); |
1498 | if (err < 0) | 1500 | if (err < 0) |
1499 | goto err_register; | 1501 | goto err_register; |
1502 | |||
1503 | t = netdev_priv(ip6n->fb_tnl_dev); | ||
1504 | |||
1505 | strcpy(t->parms.name, ip6n->fb_tnl_dev->name); | ||
1500 | return 0; | 1506 | return 0; |
1501 | 1507 | ||
1502 | err_register: | 1508 | err_register: |