diff options
author | suz <suz@FreeBSD.org> | 2005-10-19 16:20:18 +0000 |
---|---|---|
committer | suz <suz@FreeBSD.org> | 2005-10-19 16:20:18 +0000 |
commit | 44730c0a961e4ab4139bcc86c76abc037cd7bcb5 (patch) | |
tree | 663e44c4f12eb64e88a7e6185862f81f4bb294f7 /sys/netinet6/ip6_input.c | |
parent | fe91d8d38d25c016172341749416c4f164406cc7 (diff) | |
download | FreeBSD-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/ip6_input.c')
-rw-r--r-- | sys/netinet6/ip6_input.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 9c5ff4a..757b1d1 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -278,6 +278,12 @@ ip6_input(m) #undef M2MMAX } + /* drop the packet if IPv6 operation is disabled on the IF */ + if ((ND_IFINFO(m->m_pkthdr.rcvif)->flags & ND6_IFF_IFDISABLED)) { + m_freem(m); + return; + } + in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_receive); ip6stat.ip6s_total++; |