Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276780
b: refs/heads/master
c: 72b3601
h: refs/heads/master
v: v3
  • Loading branch information
Ted Feng authored and David S. Miller committed Dec 12, 2011
1 parent 61f73eb commit 25a81ad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4af04aba93f47699e7ac33e7cfd4da22550e6114
refs/heads/master: 72b36015ba43a3cca5303f5534d2c3e1899eae29
7 changes: 6 additions & 1 deletion trunk/net/ipv4/ipip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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:
Expand Down
7 changes: 6 additions & 1 deletion trunk/net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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:
Expand Down

0 comments on commit 25a81ad

Please sign in to comment.