summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/raw_ip6.c
diff options
context:
space:
mode:
authorgnn <gnn@FreeBSD.org>2007-07-01 11:41:27 +0000
committergnn <gnn@FreeBSD.org>2007-07-01 11:41:27 +0000
commit0cd74db89b7c7ca5bface8b05ae8263c0a54217b (patch)
tree2bcfb09751e29be8d172ae9e835bab3e5c5699f2 /sys/netinet6/raw_ip6.c
parent384e40af76655727c82190f4d5dc6c857583206e (diff)
downloadFreeBSD-src-0cd74db89b7c7ca5bface8b05ae8263c0a54217b.zip
FreeBSD-src-0cd74db89b7c7ca5bface8b05ae8263c0a54217b.tar.gz
Commit IPv6 support for FAST_IPSEC to the tree.
This commit includes only the kernel files, the rest of the files will follow in a second commit. Reviewed by: bz Approved by: re Supported by: Secure Computing
Diffstat (limited to 'sys/netinet6/raw_ip6.c')
-rw-r--r--sys/netinet6/raw_ip6.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index 006f7d6..3b29375 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -95,11 +95,6 @@
#include <netinet6/raw_ip6.h>
#include <netinet6/scope6_var.h>
-#ifdef IPSEC
-#include <netinet6/ipsec.h>
-#include <netinet6/ipsec6.h>
-#endif /*IPSEC*/
-
#ifdef FAST_IPSEC
#include <netipsec/ipsec.h>
#include <netipsec/ipsec6.h>
@@ -186,18 +181,16 @@ docontinue:
if (last) {
struct mbuf *n = m_copy(m, 0, (int)M_COPYALL);
-#if defined(IPSEC) || defined(FAST_IPSEC)
+#ifdef FAST_IPSEC
/*
* Check AH/ESP integrity.
*/
if (n && ipsec6_in_reject(n, last)) {
m_freem(n);
-#ifdef IPSEC
ipsec6stat.in_polvio++;
-#endif /*IPSEC*/
/* do not inject data into pcb */
} else
-#endif /*IPSEC || FAST_IPSEC*/
+#endif /* FAST_IPSEC */
if (n) {
if (last->in6p_flags & IN6P_CONTROLOPTS ||
last->in6p_socket->so_options & SO_TIMESTAMP)
@@ -219,20 +212,18 @@ docontinue:
}
last = in6p;
}
-#if defined(IPSEC) || defined(FAST_IPSEC)
+#ifdef FAST_IPSEC
/*
* Check AH/ESP integrity.
*/
if (last && ipsec6_in_reject(m, last)) {
m_freem(m);
-#ifdef IPSEC
ipsec6stat.in_polvio++;
-#endif /*IPSEC*/
ip6stat.ip6s_delivered--;
/* do not inject data into pcb */
INP_UNLOCK(last);
} else
-#endif /*IPSEC || FAST_IPSEC*/
+#endif /* FAST_IPSEC */
if (last) {
if (last->in6p_flags & IN6P_CONTROLOPTS ||
last->in6p_socket->so_options & SO_TIMESTAMP)
OpenPOWER on IntegriCloud