Ted Feng 72b36015ba ipip, sit: copy parms.name after register_netdevice
Same fix as 731abb9cb2 for ipip and sit tunnel.
Commit 1c5cae815d removed an explicit call to dev_alloc_name in
ipip_tunnel_locate and ipip6_tunnel_locate, because register_netdevice
will now create a valid name, however the tunnel keeps a copy of the
name in the private parms structure. Fix this by copying the name back
after register_netdevice has successfully returned.

This shows up if you do a simple tunnel add, followed by a tunnel show:

$ sudo ip tunnel add mode ipip remote 10.2.20.211
$ ip tunnel
tunl0: ip/ip  remote any  local any  ttl inherit  nopmtudisc
tunl%d: ip/ip  remote 10.2.20.211  local any  ttl inherit
$ sudo ip tunnel add mode sit remote 10.2.20.212
$ ip tunnel
sit0: ipv6/ip  remote any  local any  ttl 64  nopmtudisc 6rd-prefix 2002::/16
sit%d: ioctl 89f8 failed: No such device
sit%d: ipv6/ip  remote 10.2.20.212  local any  ttl inherit

Cc: stable@vger.kernel.org
Signed-off-by: Ted Feng <artisdom@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-12 18:50:51 -05:00
..
2011-11-12 18:13:32 -05:00
2011-04-22 11:04:14 -07:00
2011-10-13 16:05:07 -04:00
2011-10-19 03:10:46 -04:00
2011-10-19 03:10:46 -04:00
2011-02-01 15:35:25 -08:00
2011-11-18 14:38:59 -05:00
2011-06-08 17:05:30 -07:00
2011-03-31 11:26:23 -03:00
2011-10-24 17:36:08 -04:00
2011-03-31 11:26:23 -03:00
2011-10-24 17:36:08 -04:00
2010-10-27 11:37:32 -07:00
2011-12-01 14:12:55 -05:00
2010-07-12 12:57:54 -07:00