diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-20 08:35:13 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-20 08:35:13 +0000 |
commit | d23f4366558c7f5e779414b87704dc1cf76c66f2 (patch) | |
tree | 1aea5a6659ccde9a255a1541e4e2fa901f6f9bdb /sys/netinet/udp_usrreq.c | |
parent | 2175c2c5f4dcbf23add3978e0f5ec4cb30417ec4 (diff) |
Use packet tags instead of tdbi.
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r-- | sys/netinet/udp_usrreq.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 6afae145697..3c3d6be9490 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp_usrreq.c,v 1.57 2001/05/11 17:20:12 aaron Exp $ */ +/* $OpenBSD: udp_usrreq.c,v 1.58 2001/05/20 08:35:12 angelos Exp $ */ /* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */ /* @@ -172,6 +172,7 @@ udp_input(m, va_alist) struct ip6_hdr *ipv6; #endif /* INET6 */ #ifdef IPSEC + struct m_tag *mtag; struct tdb_ident *tdbi; struct tdb *tdb; int error, s; @@ -516,16 +517,15 @@ udp_input(m, va_alist) } #ifdef IPSEC - tdbi = (struct tdb_ident *) m->m_pkthdr.tdbi; - + mtag = m_tag_find(m, PACKET_TAG_IPSEC_DONE, NULL); s = splnet(); - 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, srcsa.sa.sa_family, iphlen, &error, - IPSP_DIRECTION_IN, tdb, inp); + IPSP_DIRECTION_IN, tdb, inp); splx(s); /* No SA latching done for UDP */ |