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 /usr.sbin/ndp | |
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 'usr.sbin/ndp')
-rw-r--r-- | usr.sbin/ndp/ndp.8 | 11 | ||||
-rw-r--r-- | usr.sbin/ndp/ndp.c | 13 |
2 files changed, 21 insertions, 3 deletions
diff --git a/usr.sbin/ndp/ndp.8 b/usr.sbin/ndp/ndp.8 index 945f1ee..e9b75dd 100644 --- a/usr.sbin/ndp/ndp.8 +++ b/usr.sbin/ndp/ndp.8 @@ -135,6 +135,17 @@ which means the flag should be cleared. turn on or off NUD (Neighbor Unreachability Detection) on the interface. NUD is usually turned on by default. +.It Xo +.Ic accept_rtadv +.Xc +Specify whether or not to accept Router Advertisement messages +received on the +.Ar interface . +Note that the kernel does not accept Router Advertisement messages +unless the +.Li net.inet6.ip6.accept_rtadv +variable is non-0, even if the flag is on. +This flag is set to 1 by default. .El .It Fl n Do not try to resolve numeric address to hostname. 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 |