aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipip.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ipip.c')
-rw-r--r--net/ipv4/ipip.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index da281581692c..e77e3b855834 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -221,16 +221,8 @@ static struct ip_tunnel * ipip_tunnel_locate(struct ip_tunnel_parm *parms, int c
221 221
222 if (parms->name[0]) 222 if (parms->name[0])
223 strlcpy(name, parms->name, IFNAMSIZ); 223 strlcpy(name, parms->name, IFNAMSIZ);
224 else { 224 else
225 int i; 225 sprintf(name, "tunl%%d");
226 for (i=1; i<100; i++) {
227 sprintf(name, "tunl%d", i);
228 if (__dev_get_by_name(&init_net, name) == NULL)
229 break;
230 }
231 if (i==100)
232 goto failed;
233 }
234 226
235 dev = alloc_netdev(sizeof(*t), name, ipip_tunnel_setup); 227 dev = alloc_netdev(sizeof(*t), name, ipip_tunnel_setup);
236 if (dev == NULL) 228 if (dev == NULL)