Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86301
b: refs/heads/master
c: 34cc7ba
h: refs/heads/master
i:
  86299: a331eb2
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Feb 24, 2008
1 parent 302e26b commit d17b0ed
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 44 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55b01e8681cba392ccda4ff6184054d38968115d
refs/heads/master: 34cc7ba6398203aab4056917fa1e2aa5988487aa
2 changes: 0 additions & 2 deletions trunk/include/net/ip6_tunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
/* capable of receiving packets */
#define IP6_TNL_F_CAP_RCV 0x20000

#define IP6_TNL_MAX 128

/* IPv6 tunnel */

struct ip6_tnl {
Expand Down
12 changes: 2 additions & 10 deletions trunk/net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 2 additions & 10 deletions trunk/net/ipv4/ipip.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,8 @@ static struct ip_tunnel * ipip_tunnel_locate(struct ip_tunnel_parm *parms, int c

if (parms->name[0])
strlcpy(name, parms->name, IFNAMSIZ);
else {
int i;
for (i=1; i<100; i++) {
sprintf(name, "tunl%d", i);
if (__dev_get_by_name(&init_net, name) == NULL)
break;
}
if (i==100)
goto failed;
}
else
sprintf(name, "tunl%%d");

dev = alloc_netdev(sizeof(*t), name, ipip_tunnel_setup);
if (dev == NULL)
Expand Down
15 changes: 4 additions & 11 deletions trunk/net/ipv6/ip6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,18 +229,11 @@ static struct ip6_tnl *ip6_tnl_create(struct ip6_tnl_parm *p)
char name[IFNAMSIZ];
int err;

if (p->name[0]) {
if (p->name[0])
strlcpy(name, p->name, IFNAMSIZ);
} else {
int i;
for (i = 1; i < IP6_TNL_MAX; i++) {
sprintf(name, "ip6tnl%d", i);
if (__dev_get_by_name(&init_net, name) == NULL)
break;
}
if (i == IP6_TNL_MAX)
goto failed;
}
else
sprintf(name, "ip6tnl%%d");

dev = alloc_netdev(sizeof (*t), name, ip6_tnl_dev_setup);
if (dev == NULL)
goto failed;
Expand Down
12 changes: 2 additions & 10 deletions trunk/net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,8 @@ static struct ip_tunnel * ipip6_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, "sit%d", i);
if (__dev_get_by_name(&init_net, name) == NULL)
break;
}
if (i==100)
goto failed;
}
else
sprintf(name, "sit%%d");

dev = alloc_netdev(sizeof(*t), name, ipip6_tunnel_setup);
if (dev == NULL)
Expand Down

0 comments on commit d17b0ed

Please sign in to comment.