[IPV6] NDISC: Ignore route information with /0 prefix from interior router.
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Sun, 16 Mar 2008 03:56:52 +0000 (23:56 -0400)
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Thu, 3 Apr 2008 01:06:00 +0000 (10:06 +0900)
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
net/ipv6/ndisc.c

index 53b546019fd58f9c3565b98f71b9b022324454f8..16273e11e53d76e0bc2d40eb3080a0cefb00bfa5 100644 (file)
@@ -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);