summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>1999-12-22 19:13:38 +0000
committershin <shin@FreeBSD.org>1999-12-22 19:13:38 +0000
commit50ba589c666f7d356304339b9cfc7fc9d173ad8d (patch)
tree46d6ae7c9680a93ce1c3a13378cef283df9f6544 /sys/netinet/tcp_usrreq.c
parente396740391e7e60805bda6799ac3397d1fc8c539 (diff)
downloadFreeBSD-src-50ba589c666f7d356304339b9cfc7fc9d173ad8d.zip
FreeBSD-src-50ba589c666f7d356304339b9cfc7fc9d173ad8d.tar.gz
IPSEC support in the kernel.
pr_input() routines prototype is also changed to support IPSEC and IPV6 chained protocol headers. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 7d7f71f..d3aea36 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -34,6 +34,7 @@
* $FreeBSD$
*/
+#include "opt_ipsec.h"
#include "opt_tcpdebug.h"
#include <sys/param.h>
@@ -63,6 +64,10 @@
#include <netinet/tcp_debug.h>
#endif
+#ifdef IPSEC
+#include <netinet6/ipsec.h>
+#endif /*IPSEC*/
+
/*
* TCP protocol interface to socket abstraction.
*/
@@ -731,6 +736,13 @@ tcp_attach(so, p)
if (error)
return (error);
inp = sotoinpcb(so);
+#ifdef IPSEC
+ error = ipsec_init_policy(so, &inp->inp_sp);
+ if (error) {
+ in_pcbdetach(inp);
+ return (error);
+ }
+#endif /*IPSEC*/
inp->inp_vflag |= INP_IPV4;
tp = tcp_newtcpcb(inp);
if (tp == 0) {
OpenPOWER on IntegriCloud