diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-15 23:56:52 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-03 10:06:00 +0900 |
commit | 6294e000736401d4415ad41f408e56e14aaaf7b4 (patch) | |
tree | d913282b07fdd581b3cb737d24c66864a097eebf /net/ipv6 | |
parent | 300aaeeaab5f447fcf40e911afe96df3de28f0db (diff) |
[IPV6] NDISC: Ignore route information with /0 prefix from interior router.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ndisc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 53b546019fd..16273e11e53 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -1272,7 +1272,13 @@ skip_linkparms: for (p = ndopts.nd_opts_ri; p; p = ndisc_next_option(p, ndopts.nd_opts_ri_end)) { - if (((struct route_info *)p)->prefix_len > in6_dev->cnf.accept_ra_rt_info_max_plen) + struct route_info *ri = (struct route_info *)p; +#ifdef CONFIG_IPV6_NDISC_NODETYPE + if (skb->ndisc_nodetype == NDISC_NODETYPE_NODEFAULT && + ri->prefix_len == 0) + continue; +#endif + if (ri->prefix_len > in6_dev->cnf.accept_ra_rt_info_max_plen) continue; rt6_route_rcv(skb->dev, (u8*)p, (p->nd_opt_len) << 3, &ipv6_hdr(skb)->saddr); |