summaryrefslogtreecommitdiff
path: root/sys/netinet6/nd6_rtr.c
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2003-08-05 14:57:11 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2003-08-05 14:57:11 +0000
commit07cf047d5a4f2f47cdaba2f1ef694c62818fdf16 (patch)
treef89aeb24f450191c1cafa51dd63b26028ebc0bd4 /sys/netinet6/nd6_rtr.c
parent5246b4ff88f177ed3e74bf882945e941828d7adc (diff)
Notes
Diffstat (limited to 'sys/netinet6/nd6_rtr.c')
-rw-r--r--sys/netinet6/nd6_rtr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index 651a14d0ff89..7714969d4f95 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,