diff options
author | David S. Miller <davem@davemloft.net> | 2011-12-16 02:11:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-16 02:11:14 -0500 |
commit | b26e478f8fd5b575684f021b05a5c6236ebb911a (patch) | |
tree | 27d3b3eaf3fe10d05319ad3395b2569ad5f8f6d0 /net/ipv6/sit.c | |
parent | bcebcc468a6bcd3820fe9ad36b34220563efc93a (diff) | |
parent | bb3c36863e8001fc21a88bebfdead4da4c23e848 (diff) | |
download | op-kernel-dev-b26e478f8fd5b575684f021b05a5c6236ebb911a.zip op-kernel-dev-b26e478f8fd5b575684f021b05a5c6236ebb911a.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/freescale/fsl_pq_mdio.c
net/batman-adv/translation-table.c
net/ipv6/route.c
Diffstat (limited to 'net/ipv6/sit.c')
-rw-r--r-- | net/ipv6/sit.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index b7d14cc..3b6dac9 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -263,6 +263,8 @@ static struct ip_tunnel *ipip6_tunnel_locate(struct net *net, if (register_netdevice(dev) < 0) goto failed_free; + strcpy(nt->parms.name, dev->name); + dev_hold(dev); ipip6_tunnel_link(sitn, nt); @@ -1144,7 +1146,6 @@ static int ipip6_tunnel_init(struct net_device *dev) struct ip_tunnel *tunnel = netdev_priv(dev); tunnel->dev = dev; - strcpy(tunnel->parms.name, dev->name); memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4); memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4); @@ -1207,6 +1208,7 @@ static void __net_exit sit_destroy_tunnels(struct sit_net *sitn, struct list_hea static int __net_init sit_init_net(struct net *net) { struct sit_net *sitn = net_generic(net, sit_net_id); + struct ip_tunnel *t; int err; sitn->tunnels[0] = sitn->tunnels_wc; @@ -1231,6 +1233,9 @@ static int __net_init sit_init_net(struct net *net) if ((err = register_netdev(sitn->fb_tunnel_dev))) goto err_reg_dev; + t = netdev_priv(sitn->fb_tunnel_dev); + + strcpy(t->parms.name, sitn->fb_tunnel_dev->name); return 0; err_reg_dev: |