aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSascha Hlusiak <contact@saschahlusiak.de>2009-09-26 23:28:07 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-26 23:28:07 -0400
commitd1f8297a96b0d70f17704296a6666468f2087ce6 (patch)
tree308ecb282fcaf98439918c13178a2dc326bc8eb0 /net
parent7eaf5077b37bb33dbd44e569ff88566d6fe286e9 (diff)
Revert "sit: stateless autoconf for isatap"
This reverts commit 645069299a1c7358cf7330afe293f07552f11a5d. While the code does not actually break anything, it does not completely follow RFC5214 yet. After talking back with Fred L. Templin, I agree that completing the ISATAP specific RS/RA code, would pollute the kernel a lot with code that is better implemented in userspace. The kernel should not send RS packages for ISATAP at all. Signed-off-by: Sascha Hlusiak <contact@saschahlusiak.de> Acked-by: Fred L. Templin <Fred.L.Templin@boeing.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/ndisc.c1
-rw-r--r--net/ipv6/sit.c58
2 files changed, 0 insertions, 59 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 498b9b0b0fad..f74e4e2cdd06 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -658,7 +658,6 @@ void ndisc_send_rs(struct net_device *dev, const struct in6_addr *saddr,
658 &icmp6h, NULL, 658 &icmp6h, NULL,
659 send_sllao ? ND_OPT_SOURCE_LL_ADDR : 0); 659 send_sllao ? ND_OPT_SOURCE_LL_ADDR : 0);
660} 660}
661EXPORT_SYMBOL(ndisc_send_rs);
662 661
663 662
664static void ndisc_error_report(struct neighbour *neigh, struct sk_buff *skb) 663static void ndisc_error_report(struct neighbour *neigh, struct sk_buff *skb)
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index fcb539628847..d65e0c496cc0 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -15,7 +15,6 @@
15 * Roger Venning <r.venning@telstra.com>: 6to4 support 15 * Roger Venning <r.venning@telstra.com>: 6to4 support
16 * Nate Thompson <nate@thebog.net>: 6to4 support 16 * Nate Thompson <nate@thebog.net>: 6to4 support
17 * Fred Templin <fred.l.templin@boeing.com>: isatap support 17 * Fred Templin <fred.l.templin@boeing.com>: isatap support
18 * Sascha Hlusiak <mail@saschahlusiak.de>: stateless autoconf for isatap
19 */ 18 */
20 19
21#include <linux/module.h> 20#include <linux/module.h>
@@ -223,44 +222,6 @@ failed:
223 return NULL; 222 return NULL;
224} 223}
225 224
226static void ipip6_tunnel_rs_timer(unsigned long data)
227{
228 struct ip_tunnel_prl_entry *p = (struct ip_tunnel_prl_entry *) data;
229 struct inet6_dev *ifp;
230 struct inet6_ifaddr *addr;
231
232 spin_lock(&p->lock);
233 ifp = __in6_dev_get(p->tunnel->dev);
234
235 read_lock_bh(&ifp->lock);
236 for (addr = ifp->addr_list; addr; addr = addr->if_next) {
237 struct in6_addr rtr;
238
239 if (!(ipv6_addr_type(&addr->addr) & IPV6_ADDR_LINKLOCAL))
240 continue;
241
242 /* Send RS to guessed linklocal address of router
243 *
244 * Better: send to ff02::2 encapsuled in unicast directly
245 * to router-v4 instead of guessing the v6 address.
246 *
247 * Cisco/Windows seem to not set the u/l bit correctly,
248 * so we won't guess right.
249 */
250 ipv6_addr_set(&rtr, htonl(0xFE800000), 0, 0, 0);
251 if (!__ipv6_isatap_ifid(rtr.s6_addr + 8,
252 p->addr)) {
253 ndisc_send_rs(p->tunnel->dev, &addr->addr, &rtr);
254 }
255 }
256 read_unlock_bh(&ifp->lock);
257
258 mod_timer(&p->rs_timer, jiffies + HZ * p->rs_delay);
259 spin_unlock(&p->lock);
260
261 return;
262}
263
264static struct ip_tunnel_prl_entry * 225static struct ip_tunnel_prl_entry *
265__ipip6_tunnel_locate_prl(struct ip_tunnel *t, __be32 addr) 226__ipip6_tunnel_locate_prl(struct ip_tunnel *t, __be32 addr)
266{ 227{
@@ -319,7 +280,6 @@ static int ipip6_tunnel_get_prl(struct ip_tunnel *t,
319 continue; 280 continue;
320 kp[c].addr = prl->addr; 281 kp[c].addr = prl->addr;
321 kp[c].flags = prl->flags; 282 kp[c].flags = prl->flags;
322 kp[c].rs_delay = prl->rs_delay;
323 c++; 283 c++;
324 if (kprl.addr != htonl(INADDR_ANY)) 284 if (kprl.addr != htonl(INADDR_ANY))
325 break; 285 break;
@@ -369,23 +329,11 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg)
369 } 329 }
370 330
371 p->next = t->prl; 331 p->next = t->prl;
372 p->tunnel = t;
373 t->prl = p; 332 t->prl = p;
374 t->prl_count++; 333 t->prl_count++;
375
376 spin_lock_init(&p->lock);
377 setup_timer(&p->rs_timer, ipip6_tunnel_rs_timer, (unsigned long) p);
378update: 334update:
379 p->addr = a->addr; 335 p->addr = a->addr;
380 p->flags = a->flags; 336 p->flags = a->flags;
381 p->rs_delay = a->rs_delay;
382 if (p->rs_delay == 0)
383 p->rs_delay = IPTUNNEL_RS_DEFAULT_DELAY;
384 spin_lock(&p->lock);
385 del_timer(&p->rs_timer);
386 if (p->flags & PRL_DEFAULT)
387 mod_timer(&p->rs_timer, jiffies + 1);
388 spin_unlock(&p->lock);
389out: 337out:
390 write_unlock(&ipip6_lock); 338 write_unlock(&ipip6_lock);
391 return err; 339 return err;
@@ -404,9 +352,6 @@ ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a)
404 if ((*p)->addr == a->addr) { 352 if ((*p)->addr == a->addr) {
405 x = *p; 353 x = *p;
406 *p = x->next; 354 *p = x->next;
407 spin_lock(&x->lock);
408 del_timer(&x->rs_timer);
409 spin_unlock(&x->lock);
410 kfree(x); 355 kfree(x);
411 t->prl_count--; 356 t->prl_count--;
412 goto out; 357 goto out;
@@ -417,9 +362,6 @@ ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a)
417 while (t->prl) { 362 while (t->prl) {
418 x = t->prl; 363 x = t->prl;
419 t->prl = t->prl->next; 364 t->prl = t->prl->next;
420 spin_lock(&x->lock);
421 del_timer(&x->rs_timer);
422 spin_unlock(&x->lock);
423 kfree(x); 365 kfree(x);
424 t->prl_count--; 366 t->prl_count--;
425 } 367 }