diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-29 11:29:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-29 11:29:55 -0500 |
commit | 219ff3ad611ecfe8a2fd29b8c50a5313c9d15383 (patch) | |
tree | 69a9ad12ed64d0966ec63bb5c4699e3effb5490f /net/ipv6/sit.c | |
parent | 547598d3a91f11b1f802bf0b122f777c3c22f26d (diff) | |
parent | 2335f8ec27e125208d8d2d3e257a82862c4977d6 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (79 commits)
[X25]: Use proc_create() to setup ->proc_fops first
[WANROUTER]: Use proc_create() to setup ->proc_fops first
[8021Q]: Use proc_create() to setup ->proc_fops first
[IPV4]: Use proc_create() to setup ->proc_fops first
[IPV6]: Use proc_create() to setup ->proc_fops first
[SCTP]: Use proc_create() to setup ->proc_fops first
[PKTGEN]: Use proc_create() to setup ->proc_fops first
[NEIGHBOUR]: Use proc_create() to setup ->proc_fops first
[LLC]: Use proc_create() to setup ->proc_fops first
[IPX]: Use proc_create() to setup ->proc_fops first
[SUNRPC]: Use proc_create() to setup ->proc_fops first
[ATM]: Use proc_create() to setup ->proc_fops first
[SCTP]: Update AUTH structures to match declarations in draft-16.
[SCTP]: Incorrect length was used in SCTP_*_AUTH_CHUNKS socket option
[SCTP]: Clean up naming conventions of sctp protocol/address family registration
[APPLETALK]: Use proc_create() to setup ->proc_fops first
[BNX2X]: add bnx2x to MAINTAINERS
[BNX2X]: update version, remove CVS strings
[BNX2X]: Fix Xmit bugs
[BNX2X]: Prevent PCI queue overflow
...
Diffstat (limited to 'net/ipv6/sit.c')
-rw-r--r-- | net/ipv6/sit.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index dde7801abeff..1656c003b989 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -171,6 +171,11 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int | |||
171 | if (dev == NULL) | 171 | if (dev == NULL) |
172 | return NULL; | 172 | return NULL; |
173 | 173 | ||
174 | if (strchr(name, '%')) { | ||
175 | if (dev_alloc_name(dev, name) < 0) | ||
176 | goto failed_free; | ||
177 | } | ||
178 | |||
174 | nt = netdev_priv(dev); | 179 | nt = netdev_priv(dev); |
175 | dev->init = ipip6_tunnel_init; | 180 | dev->init = ipip6_tunnel_init; |
176 | nt->parms = *parms; | 181 | nt->parms = *parms; |
@@ -178,16 +183,16 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int | |||
178 | if (parms->i_flags & SIT_ISATAP) | 183 | if (parms->i_flags & SIT_ISATAP) |
179 | dev->priv_flags |= IFF_ISATAP; | 184 | dev->priv_flags |= IFF_ISATAP; |
180 | 185 | ||
181 | if (register_netdevice(dev) < 0) { | 186 | if (register_netdevice(dev) < 0) |
182 | free_netdev(dev); | 187 | goto failed_free; |
183 | goto failed; | ||
184 | } | ||
185 | 188 | ||
186 | dev_hold(dev); | 189 | dev_hold(dev); |
187 | 190 | ||
188 | ipip6_tunnel_link(nt); | 191 | ipip6_tunnel_link(nt); |
189 | return nt; | 192 | return nt; |
190 | 193 | ||
194 | failed_free: | ||
195 | free_netdev(dev); | ||
191 | failed: | 196 | failed: |
192 | return NULL; | 197 | return NULL; |
193 | } | 198 | } |