diff options
author | 2001-05-20 08:35:10 +0000 | |
---|---|---|
committer | 2001-05-20 08:35:10 +0000 | |
commit | 49e6be5bf5afcaf09858b0593b4a63f5a7da4833 (patch) | |
tree | 8b137b0cf910b1ced5b3dc0c65bad36607c463fd /sys/netinet/tcp_input.c | |
parent | Record outgoing SA processing, do loop detection. (diff) | |
download | wireguard-openbsd-49e6be5bf5afcaf09858b0593b4a63f5a7da4833.tar.xz wireguard-openbsd-49e6be5bf5afcaf09858b0593b4a63f5a7da4833.zip |
Use packet tags instead of tdbi.
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 4a3fd659803..20c4399fbb1 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.87 2001/05/12 18:35:17 aaron Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.88 2001/05/20 08:35:11 angelos Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -392,6 +392,7 @@ tcp_input(m, va_alist) struct ip6_hdr *ipv6 = NULL; #endif /* INET6 */ #ifdef IPSEC + struct m_tag *mtag; struct tdb_ident *tdbi; struct tdb *tdb; int error, s; @@ -765,15 +766,15 @@ findpcb: } #ifdef IPSEC + mtag = m_tag_find(m, PACKET_TAG_IPSEC_DONE, NULL); s = splnet(); - tdbi = (struct tdb_ident *) m->m_pkthdr.tdbi; - if (tdbi == NULL) - tdb = NULL; - else + if (mtag != NULL) { + tdbi = (struct tdb_ident *)(mtag + 1); tdb = gettdb(tdbi->spi, &tdbi->dst, tdbi->proto); - + } else + tdb = NULL; ipsp_spd_lookup(m, af, iphlen, &error, IPSP_DIRECTION_IN, - tdb, inp); + tdb, inp); /* Latch SA */ if (inp->inp_tdb_in != tdb) { |