summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ipsec_input.c20
1 files 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 */