diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2012-01-04 00:27:45 +0400 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2012-01-04 00:27:45 +0400 |
| commit | 5d3cb0ffdd0c8987dc17a2ef4529b246198ceb72 (patch) | |
| tree | c60bdca0529cbd44d32b3918b78d14e182ef57cd /net/ipv4/ipip.c | |
| parent | 3b0d597139efddfd8960b44249b4a4c977d172f1 (diff) | |
| parent | 5f0a6e2d503896062f641639dacfe5055c2f593b (diff) | |
| download | linux-5d3cb0ffdd0c8987dc17a2ef4529b246198ceb72.tar.xz | |
Merge branch 'v3.2-rc7' into next/pm
Conflicts:
arch/arm/kernel/setup.c
arch/arm/mach-shmobile/board-kota2.c
Diffstat (limited to 'net/ipv4/ipip.c')
| -rw-r--r-- | net/ipv4/ipip.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 065effd8349a..0b2e7329abda 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c @@ -285,6 +285,8 @@ static struct ip_tunnel * ipip_tunnel_locate(struct net *net, if (register_netdevice(dev) < 0) goto failed_free; + strcpy(nt->parms.name, dev->name); + dev_hold(dev); ipip_tunnel_link(ipn, nt); return nt; @@ -759,7 +761,6 @@ static int ipip_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); @@ -825,6 +826,7 @@ static void ipip_destroy_tunnels(struct ipip_net *ipn, struct list_head *head) static int __net_init ipip_init_net(struct net *net) { struct ipip_net *ipn = net_generic(net, ipip_net_id); + struct ip_tunnel *t; int err; ipn->tunnels[0] = ipn->tunnels_wc; @@ -848,6 +850,9 @@ static int __net_init ipip_init_net(struct net *net) if ((err = register_netdev(ipn->fb_tunnel_dev))) goto err_reg_dev; + t = netdev_priv(ipn->fb_tunnel_dev); + + strcpy(t->parms.name, ipn->fb_tunnel_dev->name); return 0; err_reg_dev: |
