--- linux/net/ipv4/ipip.c Thu Mar 25 09:23:34 1999 +++ linux/net/ipv4/ipip.c Tue Aug 10 01:43:10 1999 @@ -215,13 +215,15 @@ prio |= 1; h ^= HASH(local); } - for (tp = &tunnels[prio][h]; (t = *tp) != NULL; tp = &t->next) { + if (!create) //XBONE: not add tunnel + { + for (tp = &tunnels[prio][h]; (t = *tp) != NULL; tp = &t->next) { if (local == t->parms.iph.saddr && remote == t->parms.iph.daddr) return t; - } - if (!create) + } return NULL; - + } + //XBONE: add tunnel MOD_INC_USE_COUNT; dev = kmalloc(sizeof(*dev) + sizeof(*t), GFP_KERNEL); if (dev == NULL) { @@ -662,12 +664,12 @@ if (dev != &ipip_fb_tunnel_dev && cmd == SIOCCHGTUNNEL && t != &ipip_fb_tunnel) { - if (t != NULL) { + /* if (t != NULL) { //XBONE: two tunnels over one link possible if (t->dev != dev) { err = -EEXIST; break; } - } else { + } else {*/ if (((dev->flags&IFF_POINTOPOINT) && !p.iph.daddr) || (!(dev->flags&IFF_POINTOPOINT) && p.iph.daddr)) { err = -EINVAL; @@ -684,7 +686,7 @@ end_bh_atomic(); netdev_state_change(dev); } - } + // } if (t) { err = 0;