diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-26 14:26:14 +1100 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-26 14:26:14 +1100 |
commit | 91e229bbad6524aabaac8717b2f559283670c37a (patch) | |
tree | 84a55e4ac2dcf23add97bd9fde3e9cb232c12b30 /net/ipv4/ip_gre.c | |
parent | 6e5e93424dc66542c548dfaa3bfebe30d46d50dd (diff) | |
parent | bfa274e2436fc7ef72ef51c878083647f1cfd429 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r-- | net/ipv4/ip_gre.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 63f69171935..906cb1ada4c 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -259,16 +259,8 @@ static struct ip_tunnel * ipgre_tunnel_locate(struct ip_tunnel_parm *parms, int if (parms->name[0]) strlcpy(name, parms->name, IFNAMSIZ); - else { - int i; - for (i=1; i<100; i++) { - sprintf(name, "gre%d", i); - if (__dev_get_by_name(&init_net, name) == NULL) - break; - } - if (i==100) - goto failed; - } + else + sprintf(name, "gre%%d"); dev = alloc_netdev(sizeof(*t), name, ipgre_tunnel_setup); if (!dev) |