summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authorangelos <angelos@openbsd.org>2001-05-27 03:55:59 +0000
committerangelos <angelos@openbsd.org>2001-05-27 03:55:59 +0000
commit0921d6e06ff1dab4f6746696fc6c94d39fc15af5 (patch)
tree38a88b315714e06ffcea78abb72157d600bbbfae /sys/netinet/tcp_input.c
parentFree IPsec authentication material on PCB tear down. (diff)
downloadwireguard-openbsd-0921d6e06ff1dab4f6746696fc6c94d39fc15af5.tar.xz
wireguard-openbsd-0921d6e06ff1dab4f6746696fc6c94d39fc15af5.zip
Also copy the authentication material to the new socket.
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 4d0403fc009..8e32c574f82 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.90 2001/05/27 03:16:10 angelos Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.91 2001/05/27 03:55:59 angelos Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -710,19 +710,23 @@ findpcb:
newinp->inp_secrequire = inp->inp_secrequire;
if (inp->inp_ipsec_localid != NULL) {
newinp->inp_ipsec_localid = inp->inp_ipsec_localid;
- newinp->inp_ipsec_localid->ref_count++;
+ inp->inp_ipsec_localid->ref_count++;
}
if (inp->inp_ipsec_remoteid != NULL) {
newinp->inp_ipsec_remoteid = inp->inp_ipsec_remoteid;
- newinp->inp_ipsec_remoteid->ref_count++;
+ inp->inp_ipsec_remoteid->ref_count++;
}
if (inp->inp_ipsec_localcred != NULL) {
newinp->inp_ipsec_localcred = inp->inp_ipsec_localcred;
- newinp->inp_ipsec_localcred->ref_count++;
+ inp->inp_ipsec_localcred->ref_count++;
}
if (inp->inp_ipsec_remotecred != NULL) {
newinp->inp_ipsec_remotecred = inp->inp_ipsec_remotecred;
- newinp->inp_ipsec_remotecred->ref_count++;
+ inp->inp_ipsec_remotecred->ref_count++;
+ }
+ if (inp->inp_ipsec_auth != NULL) {
+ newinp->inp_ipsec_auth = inp->inp_ipsec_auth;
+ inp->inp_ipsec_auth->ref_count++;
}
}
#endif /* IPSEC */