aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ndisc.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2006-03-20 20:07:03 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-20 20:07:03 -0500
commit09c884d4c3b45cda904c2291d4723074ff523611 (patch)
tree90b893f1b83165d7088ecdead94085969e0a58ef /net/ipv6/ndisc.c
parente317da96227cef28a137e2d1ad790b23e518dd2b (diff)
[IPV6]: ROUTE: Add accept_ra_rt_info_max_plen sysctl.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r--net/ipv6/ndisc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 1f6256909674..dfa20d3be9b6 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1214,11 +1214,13 @@ skip_defrtr:
1214 } 1214 }
1215 1215
1216#ifdef CONFIG_IPV6_ROUTE_INFO 1216#ifdef CONFIG_IPV6_ROUTE_INFO
1217 if (ndopts.nd_opts_ri) { 1217 if (in6_dev->cnf.accept_ra_rtr_pref && ndopts.nd_opts_ri) {
1218 struct nd_opt_hdr *p; 1218 struct nd_opt_hdr *p;
1219 for (p = ndopts.nd_opts_ri; 1219 for (p = ndopts.nd_opts_ri;
1220 p; 1220 p;
1221 p = ndisc_next_option(p, ndopts.nd_opts_ri_end)) { 1221 p = ndisc_next_option(p, ndopts.nd_opts_ri_end)) {
1222 if (((struct route_info *)p)->prefix_len > in6_dev->cnf.accept_ra_rt_info_max_plen)
1223 continue;
1222 rt6_route_rcv(skb->dev, (u8*)p, (p->nd_opt_len) << 3, 1224 rt6_route_rcv(skb->dev, (u8*)p, (p->nd_opt_len) << 3,
1223 &skb->nh.ipv6h->saddr); 1225 &skb->nh.ipv6h->saddr);
1224 } 1226 }