diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-04-29 21:21:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-05 13:57:45 -0400 |
commit | 1c5cae815d19ffe02bdfda1260949ef2b1806171 (patch) | |
tree | d47a73c05afacd21985abb8df9862136385c58f0 /net/ipv6 | |
parent | e8920674979705392abc4db4ebbe78feb68a4da1 (diff) |
net: call dev_alloc_name from register_netdevice
Force dev_alloc_name() to be called from register_netdevice() by
dev_get_valid_name(). That allows to remove multiple explicit
dev_alloc_name() calls.
The possibility to call dev_alloc_name in advance remains.
This also fixes veth creation regresion caused by
84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 5 | ||||
-rw-r--r-- | net/ipv6/sit.c | 5 |
2 files changed, 0 insertions, 10 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 3dff27cba95c..36c2842a86b2 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -280,11 +280,6 @@ static struct ip6_tnl *ip6_tnl_create(struct net *net, struct ip6_tnl_parm *p) | |||
280 | 280 | ||
281 | dev_net_set(dev, net); | 281 | dev_net_set(dev, net); |
282 | 282 | ||
283 | if (strchr(name, '%')) { | ||
284 | if (dev_alloc_name(dev, name) < 0) | ||
285 | goto failed_free; | ||
286 | } | ||
287 | |||
288 | t = netdev_priv(dev); | 283 | t = netdev_priv(dev); |
289 | t->parms = *p; | 284 | t->parms = *p; |
290 | err = ip6_tnl_dev_init(dev); | 285 | err = ip6_tnl_dev_init(dev); |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index c53abcf50d29..a6a32b39b607 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -250,11 +250,6 @@ static struct ip_tunnel *ipip6_tunnel_locate(struct net *net, | |||
250 | 250 | ||
251 | dev_net_set(dev, net); | 251 | dev_net_set(dev, net); |
252 | 252 | ||
253 | if (strchr(name, '%')) { | ||
254 | if (dev_alloc_name(dev, name) < 0) | ||
255 | goto failed_free; | ||
256 | } | ||
257 | |||
258 | nt = netdev_priv(dev); | 253 | nt = netdev_priv(dev); |
259 | 254 | ||
260 | nt->parms = *parms; | 255 | nt->parms = *parms; |