From 509351761b51c55e0a8bf98fefdf9b581c22acb3 Mon Sep 17 00:00:00 2001 From: angelos Date: Wed, 29 Mar 2000 09:37:02 +0000 Subject: [PATCH] Fix problem with TCP/UDP and ACLs. --- sys/netinet/ipsec_input.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c index 5cf8cdb67c5..8b911052d92 100644 --- a/sys/netinet/ipsec_input.c +++ b/sys/netinet/ipsec_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_input.c,v 1.21 2000/03/29 08:50:38 angelos Exp $ */ +/* $OpenBSD: ipsec_input.c,v 1.22 2000/03/29 09:37:02 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -453,15 +453,23 @@ ipsec_common_input_cb(struct mbuf *m, struct tdb *tdbp, int skip, int protoff) #ifdef INET if (af == AF_INET) - m_copydata(m, offsetof(struct ip, ip_src), sizeof(struct in_addr), - (caddr_t) &(src_address.sin.sin_addr)); + { + m_copydata(m, offsetof(struct ip, ip_src), sizeof(struct in_addr), + (caddr_t) &(src_address.sin.sin_addr)); + sport = (caddr_t) &src_address.sin.sin_port; + dport = (caddr_t) &dst_address.sin.sin_port; + } #endif /* INET */ #ifdef INET6 if (af == AF_INET6) - m_copydata(m, offsetof(struct ip6_hdr, ip6_src), - sizeof(struct in6_addr), - (caddr_t) &(src_address.sin6.sin6_addr)); + { + m_copydata(m, offsetof(struct ip6_hdr, ip6_src), + sizeof(struct in6_addr), + (caddr_t) &(src_address.sin6.sin6_addr)); + sport = (caddr_t) &src_address.sin6.sin6_port; + dport = (caddr_t) &dst_address.sin6.sin6_port; + } #endif /* INET6 */ /* Save transport layer source/destination ports, if any */ -- 2.20.1