diff options
| -rw-r--r-- | net/ipv4/ipip.c | 7 | ||||
| -rw-r--r-- | net/ipv6/sit.c | 7 | 
2 files changed, 12 insertions, 2 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, | |||
| 285 | if (register_netdevice(dev) < 0) | 285 | if (register_netdevice(dev) < 0) | 
| 286 | goto failed_free; | 286 | goto failed_free; | 
| 287 | 287 | ||
| 288 | strcpy(nt->parms.name, dev->name); | ||
| 289 | |||
| 288 | dev_hold(dev); | 290 | dev_hold(dev); | 
| 289 | ipip_tunnel_link(ipn, nt); | 291 | ipip_tunnel_link(ipn, nt); | 
| 290 | return nt; | 292 | return nt; | 
| @@ -759,7 +761,6 @@ static int ipip_tunnel_init(struct net_device *dev) | |||
| 759 | struct ip_tunnel *tunnel = netdev_priv(dev); | 761 | struct ip_tunnel *tunnel = netdev_priv(dev); | 
| 760 | 762 | ||
| 761 | tunnel->dev = dev; | 763 | tunnel->dev = dev; | 
| 762 | strcpy(tunnel->parms.name, dev->name); | ||
| 763 | 764 | ||
| 764 | memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4); | 765 | memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4); | 
| 765 | memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4); | 766 | 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) | |||
| 825 | static int __net_init ipip_init_net(struct net *net) | 826 | static int __net_init ipip_init_net(struct net *net) | 
| 826 | { | 827 | { | 
| 827 | struct ipip_net *ipn = net_generic(net, ipip_net_id); | 828 | struct ipip_net *ipn = net_generic(net, ipip_net_id); | 
| 829 | struct ip_tunnel *t; | ||
| 828 | int err; | 830 | int err; | 
| 829 | 831 | ||
| 830 | ipn->tunnels[0] = ipn->tunnels_wc; | 832 | ipn->tunnels[0] = ipn->tunnels_wc; | 
| @@ -848,6 +850,9 @@ static int __net_init ipip_init_net(struct net *net) | |||
| 848 | if ((err = register_netdev(ipn->fb_tunnel_dev))) | 850 | if ((err = register_netdev(ipn->fb_tunnel_dev))) | 
| 849 | goto err_reg_dev; | 851 | goto err_reg_dev; | 
| 850 | 852 | ||
| 853 | t = netdev_priv(ipn->fb_tunnel_dev); | ||
| 854 | |||
| 855 | strcpy(t->parms.name, ipn->fb_tunnel_dev->name); | ||
| 851 | return 0; | 856 | return 0; | 
| 852 | 857 | ||
| 853 | err_reg_dev: | 858 | err_reg_dev: | 
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index a7a18602a046..96f3623618e3 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, | |||
| 263 | if (register_netdevice(dev) < 0) | 263 | if (register_netdevice(dev) < 0) | 
| 264 | goto failed_free; | 264 | goto failed_free; | 
| 265 | 265 | ||
| 266 | strcpy(nt->parms.name, dev->name); | ||
| 267 | |||
| 266 | dev_hold(dev); | 268 | dev_hold(dev); | 
| 267 | 269 | ||
| 268 | ipip6_tunnel_link(sitn, nt); | 270 | ipip6_tunnel_link(sitn, nt); | 
| @@ -1144,7 +1146,6 @@ static int ipip6_tunnel_init(struct net_device *dev) | |||
| 1144 | struct ip_tunnel *tunnel = netdev_priv(dev); | 1146 | struct ip_tunnel *tunnel = netdev_priv(dev); | 
| 1145 | 1147 | ||
| 1146 | tunnel->dev = dev; | 1148 | tunnel->dev = dev; | 
| 1147 | strcpy(tunnel->parms.name, dev->name); | ||
| 1148 | 1149 | ||
| 1149 | memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4); | 1150 | memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4); | 
| 1150 | memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4); | 1151 | 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 | |||
| 1207 | static int __net_init sit_init_net(struct net *net) | 1208 | static int __net_init sit_init_net(struct net *net) | 
| 1208 | { | 1209 | { | 
| 1209 | struct sit_net *sitn = net_generic(net, sit_net_id); | 1210 | struct sit_net *sitn = net_generic(net, sit_net_id); | 
| 1211 | struct ip_tunnel *t; | ||
| 1210 | int err; | 1212 | int err; | 
| 1211 | 1213 | ||
| 1212 | sitn->tunnels[0] = sitn->tunnels_wc; | 1214 | sitn->tunnels[0] = sitn->tunnels_wc; | 
| @@ -1231,6 +1233,9 @@ static int __net_init sit_init_net(struct net *net) | |||
| 1231 | if ((err = register_netdev(sitn->fb_tunnel_dev))) | 1233 | if ((err = register_netdev(sitn->fb_tunnel_dev))) | 
| 1232 | goto err_reg_dev; | 1234 | goto err_reg_dev; | 
| 1233 | 1235 | ||
| 1236 | t = netdev_priv(sitn->fb_tunnel_dev); | ||
| 1237 | |||
| 1238 | strcpy(t->parms.name, sitn->fb_tunnel_dev->name); | ||
| 1234 | return 0; | 1239 | return 0; | 
| 1235 | 1240 | ||
| 1236 | err_reg_dev: | 1241 | err_reg_dev: | 
