summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ndp/ndp.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-08-05 14:57:11 +0000
committerume <ume@FreeBSD.org>2003-08-05 14:57:11 +0000
commit324045a3c2b6250be90ee641eeeca297a5b6f0db (patch)
treef89aeb24f450191c1cafa51dd63b26028ebc0bd4 /usr.sbin/ndp/ndp.c
parente040bef13acbc78980b4e7bc081bb6234d7a0271 (diff)
downloadFreeBSD-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 'usr.sbin/ndp/ndp.c')
-rw-r--r--usr.sbin/ndp/ndp.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c
index 3ad148b..e54b414 100644
--- a/usr.sbin/ndp/ndp.c
+++ b/usr.sbin/ndp/ndp.c
@@ -939,6 +939,9 @@ ifinfo(argc, argv)
}\
} while (0)
SETFLAG("nud", ND6_IFF_PERFORMNUD);
+#ifdef ND6_IFF_ACCEPT_RTADV
+ SETFLAG("accept_rtadv", ND6_IFF_ACCEPT_RTADV);
+#endif
ND.flags = newflags;
if (ioctl(s, SIOCSIFINFO_FLAGS, (caddr_t)&nd) < 0) {
@@ -982,9 +985,13 @@ ifinfo(argc, argv)
#endif
if (ND.flags) {
printf("\nFlags: ");
- if ((ND.flags & ND6_IFF_PERFORMNUD) != 0)
- printf("PERFORMNUD ");
- }
+ if ((ND.flags & ND6_IFF_PERFORMNUD))
+ printf("nud ");
+#ifdef ND6_IFF_ACCEPT_RTADV
+ if ((ND.flags & ND6_IFF_ACCEPT_RTADV))
+ printf("accept_rtadv ");
+#endif
+}
putc('\n', stdout);
#undef ND
OpenPOWER on IntegriCloud