diff options
author | ume <ume@FreeBSD.org> | 2003-08-05 14:57:11 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2003-08-05 14:57:11 +0000 |
commit | 324045a3c2b6250be90ee641eeeca297a5b6f0db (patch) | |
tree | f89aeb24f450191c1cafa51dd63b26028ebc0bd4 /sys/netinet6/nd6_rtr.c | |
parent | e040bef13acbc78980b4e7bc081bb6234d7a0271 (diff) | |
download | FreeBSD-src-324045a3c2b6250be90ee641eeeca297a5b6f0db.zip FreeBSD-src-324045a3c2b6250be90ee641eeeca297a5b6f0db.tar.gz |
introduced a flag bit "ND6_IFF_ACCEPT_RTADV" in the nd_ifinfo structure to
control whether to accept RAs per-interface basis.
the new stuff ensures the backward compatibility;
- the kernel does not accept RAs on any interfaces by default.
- since the default value of the flag bit is on, the kernel accepts RAs
on all interfaces when net.inet6.ip6.accept_rtadv is 1.
Obtained from: KAME
MFC after: 1 week
Diffstat (limited to 'sys/netinet6/nd6_rtr.c')
-rw-r--r-- | sys/netinet6/nd6_rtr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 651a14d..7714969 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -217,8 +217,15 @@ nd6_ra_input(m, off, icmp6len) union nd_opts ndopts; struct nd_defrouter *dr; + /* + * We only accept RAs only when + * the system-wide variable allows the acceptance, and + * per-interface variable allows RAs on the receiving interface. + */ if (ip6_accept_rtadv == 0) goto freeit; + if (!(ndi->flags & ND6_IFF_ACCEPT_RTADV)) + goto freeit; if (ip6->ip6_hlim != 255) { nd6log((LOG_ERR, |