summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/nd6.c
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 /sys/netinet6/nd6.c
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 'sys/netinet6/nd6.c')
-rw-r--r--sys/netinet6/nd6.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index ae3664f..93186a5 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1996,6 +1996,12 @@ again:
return (0);
sendpkt:
+ /* discard the packet if IPv6 operation is disabled on the interface */
+ if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) {
+ error = ENETDOWN; /* better error? */
+ goto bad;
+ }
+
#ifdef IPSEC
/* clean ipsec history once it goes out of the node */
ipsec_delaux(m);
OpenPOWER on IntegriCloud