summaryrefslogtreecommitdiff
path: root/sys/netinet6/nd6_rtr.c
diff options
context:
space:
mode:
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,