summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authorYoshinobu Inoue <shin@FreeBSD.org>1999-12-22 19:13:38 +0000
committerYoshinobu Inoue <shin@FreeBSD.org>1999-12-22 19:13:38 +0000
commit6a800098cc0778c9618a89f858021624722374bd (patch)
tree9cd3718d0c142edcd3154715cf1b5c93cd5c0d82 /sys/netinet/tcp_usrreq.c
parent2e636eed154504de1062c0a338b1f3f78c7ac4a0 (diff)
Notes
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 7d7f71f536b6..d3aea362865c 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) {