summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ndp
diff options
context:
space:
mode:
authorsuz <suz@FreeBSD.org>2005-10-19 16:20:18 +0000
committersuz <suz@FreeBSD.org>2005-10-19 16:20:18 +0000
commit44730c0a961e4ab4139bcc86c76abc037cd7bcb5 (patch)
tree663e44c4f12eb64e88a7e6185862f81f4bb294f7 /usr.sbin/ndp
parentfe91d8d38d25c016172341749416c4f164406cc7 (diff)
downloadFreeBSD-src-44730c0a961e4ab4139bcc86c76abc037cd7bcb5.zip
FreeBSD-src-44730c0a961e4ab4139bcc86c76abc037cd7bcb5.tar.gz
supported an ndp command suboption to disable IPv6 in the given interface
Obtained from: KAME Reviewd by: ume, gnn MFC after: 2 week
Diffstat (limited to 'usr.sbin/ndp')
-rw-r--r--usr.sbin/ndp/ndp.813
-rw-r--r--usr.sbin/ndp/ndp.c5
2 files changed, 18 insertions, 0 deletions
diff --git a/usr.sbin/ndp/ndp.8 b/usr.sbin/ndp/ndp.8
index ea33646..4d99527 100644
--- a/usr.sbin/ndp/ndp.8
+++ b/usr.sbin/ndp/ndp.8
@@ -198,6 +198,19 @@ selection, see the
.Pa IMPLEMENTATION
file supplied with the KAME kit.
.It Xo
+.Ic disabled
+.Xc
+Disable IPv6 operation on the interface.
+When disabled, the interface discards any IPv6 packets
+received on or being sent to the interface.
+In the sending case, an error of ENETDOWN will be returned to the
+application.
+This flag is typically set automatically in the kernel as a result of
+a certain failure of Duplicate Address Detection.
+While the flag can be set or cleared by hand with the
+.Nm
+command, it is not generally advisable to modify this flag manually.
+.It Xo
.Ic basereachable=(number)
.Xc
Specify the BaseReachbleTimer on the interface in millisecond.
diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c
index 96e8c14..33e1a6a 100644
--- a/usr.sbin/ndp/ndp.c
+++ b/usr.sbin/ndp/ndp.c
@@ -989,6 +989,7 @@ ifinfo(ifname, argc, argv)
} \
} while (0)
+ SETFLAG("disabled", ND6_IFF_IFDISABLED);
SETFLAG("nud", ND6_IFF_PERFORMNUD);
#ifdef ND6_IFF_ACCEPT_RTADV
SETFLAG("accept_rtadv", ND6_IFF_ACCEPT_RTADV);
@@ -1055,6 +1056,10 @@ ifinfo(ifname, argc, argv)
#endif
if (ND.flags) {
printf("\nFlags: ");
+#ifdef ND6_IFF_IFDISABLED
+ if ((ND.flags & ND6_IFF_IFDISABLED))
+ printf("disabled ");
+#endif
if ((ND.flags & ND6_IFF_PERFORMNUD))
printf("nud ");
#ifdef ND6_IFF_ACCEPT_RTADV
OpenPOWER on IntegriCloud