X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=sidebyside;f=net%2Fipv6%2Fndisc.c;h=dfa20d3be9b69ec23db998c2e5268e38ab60a41a;hb=4c84a39c8adba6bf2f829b217e78bfd61478191a;hp=1f6256909674307727408937e83d5c2280d81d4d;hpb=70ceb4f53929f73746be72f73707cd9f8753e2fc;p=powerpc.git diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 1f62569096..dfa20d3be9 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -1214,11 +1214,13 @@ skip_defrtr: } #ifdef CONFIG_IPV6_ROUTE_INFO - if (ndopts.nd_opts_ri) { + if (in6_dev->cnf.accept_ra_rtr_pref && ndopts.nd_opts_ri) { struct nd_opt_hdr *p; 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) + continue; rt6_route_rcv(skb->dev, (u8*)p, (p->nd_opt_len) << 3, &skb->nh.ipv6h->saddr); }