summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_proto.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/in6_proto.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/in6_proto.c')
-rw-r--r--sys/netinet6/in6_proto.c43
1 files changed, 8 insertions, 35 deletions
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c
index e80cdcc..df20857 100644
--- a/sys/netinet6/in6_proto.c
+++ b/sys/netinet6/in6_proto.c
@@ -103,27 +103,6 @@
#include <netinet6/pim6_var.h>
#include <netinet6/nd6.h>
-#ifdef IPSEC
-#include <netinet6/ipsec.h>
-#ifdef INET6
-#include <netinet6/ipsec6.h>
-#endif
-#include <netinet6/ah.h>
-#ifdef INET6
-#include <netinet6/ah6.h>
-#endif
-#ifdef IPSEC_ESP
-#include <netinet6/esp.h>
-#ifdef INET6
-#include <netinet6/esp6.h>
-#endif
-#endif
-#include <netinet6/ipcomp.h>
-#ifdef INET6
-#include <netinet6/ipcomp6.h>
-#endif
-#endif /* IPSEC */
-
#ifdef DEV_CARP
#include <netinet/ip_carp.h>
#endif
@@ -137,12 +116,8 @@
#endif /* SCTP */
#ifdef FAST_IPSEC
+#include <netipsec/ipsec.h>
#include <netipsec/ipsec6.h>
-#define IPSEC
-#define IPSEC_ESP
-#define ah6_input ipsec6_common_input
-#define esp6_input ipsec6_common_input
-#define ipcomp6_input ipsec6_common_input
#endif /* FAST_IPSEC */
#include <netinet6/ip6protosw.h>
@@ -277,35 +252,33 @@ struct ip6protosw inet6sw[] = {
.pr_input = frag6_input,
.pr_usrreqs = &nousrreqs
},
-#ifdef IPSEC
+#ifdef FAST_IPSEC
{
.pr_type = SOCK_RAW,
.pr_domain = &inet6domain,
.pr_protocol = IPPROTO_AH,
.pr_flags = PR_ATOMIC|PR_ADDR,
- .pr_input = ah6_input,
+ .pr_input = ipsec6_common_input,
.pr_usrreqs = &nousrreqs,
},
-#ifdef IPSEC_ESP
{
.pr_type = SOCK_RAW,
.pr_domain = &inet6domain,
.pr_protocol = IPPROTO_ESP,
.pr_flags = PR_ATOMIC|PR_ADDR,
- .pr_input = esp6_input,
+ .pr_input = ipsec6_common_input,
.pr_ctlinput = esp6_ctlinput,
.pr_usrreqs = &nousrreqs,
},
-#endif
{
.pr_type = SOCK_RAW,
.pr_domain = &inet6domain,
.pr_protocol = IPPROTO_IPCOMP,
.pr_flags = PR_ATOMIC|PR_ADDR,
- .pr_input = ipcomp6_input,
+ .pr_input = ipsec6_common_input,
.pr_usrreqs = &nousrreqs,
},
-#endif /* IPSEC */
+#endif /* FAST_IPSEC */
#ifdef INET
{
.pr_type = SOCK_RAW,
@@ -465,9 +438,9 @@ SYSCTL_NODE(_net_inet6, IPPROTO_TCP, tcp6, CTLFLAG_RW, 0, "TCP6");
#ifdef SCTP
SYSCTL_NODE(_net_inet6, IPPROTO_SCTP, sctp6, CTLFLAG_RW, 0, "SCTP6");
#endif
-#ifdef IPSEC
+#ifdef FAST_IPSEC
SYSCTL_NODE(_net_inet6, IPPROTO_ESP, ipsec6, CTLFLAG_RW, 0, "IPSEC6");
-#endif /* IPSEC */
+#endif /* FAST_IPSEC */
/* net.inet6.ip6 */
static int
OpenPOWER on IntegriCloud