diff options
Diffstat (limited to 'net/ipv6/ip6_tunnel.c')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index bdc15c9003d7..4e2e9ff67ef2 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -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; |
@@ -1407,7 +1409,6 @@ ip6_tnl_dev_init_gen(struct net_device *dev) | |||
1407 | struct ip6_tnl *t = netdev_priv(dev); | 1409 | struct ip6_tnl *t = netdev_priv(dev); |
1408 | 1410 | ||
1409 | t->dev = dev; | 1411 | t->dev = dev; |
1410 | strcpy(t->parms.name, dev->name); | ||
1411 | dev->tstats = alloc_percpu(struct pcpu_tstats); | 1412 | dev->tstats = alloc_percpu(struct pcpu_tstats); |
1412 | if (!dev->tstats) | 1413 | if (!dev->tstats) |
1413 | return -ENOMEM; | 1414 | return -ENOMEM; |
@@ -1487,6 +1488,7 @@ static void __net_exit ip6_tnl_destroy_tunnels(struct ip6_tnl_net *ip6n) | |||
1487 | static int __net_init ip6_tnl_init_net(struct net *net) | 1488 | static int __net_init ip6_tnl_init_net(struct net *net) |
1488 | { | 1489 | { |
1489 | struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); | 1490 | struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); |
1491 | struct ip6_tnl *t = NULL; | ||
1490 | int err; | 1492 | int err; |
1491 | 1493 | ||
1492 | ip6n->tnls[0] = ip6n->tnls_wc; | 1494 | ip6n->tnls[0] = ip6n->tnls_wc; |
@@ -1507,6 +1509,10 @@ static int __net_init ip6_tnl_init_net(struct net *net) | |||
1507 | err = register_netdev(ip6n->fb_tnl_dev); | 1509 | err = register_netdev(ip6n->fb_tnl_dev); |
1508 | if (err < 0) | 1510 | if (err < 0) |
1509 | goto err_register; | 1511 | goto err_register; |
1512 | |||
1513 | t = netdev_priv(ip6n->fb_tnl_dev); | ||
1514 | |||
1515 | strcpy(t->parms.name, ip6n->fb_tnl_dev->name); | ||
1510 | return 0; | 1516 | return 0; |
1511 | 1517 | ||
1512 | err_register: | 1518 | err_register: |