diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2022-06-29 09:01:49 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2022-06-29 09:01:49 +0000 |
commit | 4183d465e8446b5326831f42d1432eca6502691a (patch) | |
tree | 056fccfe1d4fc83f971e4f18d8c0219e1b2c5af6 /sys/netinet/ip_input.c | |
parent | 1e6cd8506449b1c683b55f59ff7e645ce4754b52 (diff) |
Nullify `ipsecflowinfo' when mbuf(9) has no ipsec flowinfo data.
Otherwise we use `ipsecflowinfo' obtained from previous packet.
ok claudio@
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index a0ef01bc55d..e4b18eebfec 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.371 2022/05/05 13:57:40 claudio Exp $ */ +/* $OpenBSD: ip_input.c,v 1.372 2022/06/29 09:01:48 mvs Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -1840,7 +1840,6 @@ ip_send_do_dispatch(void *xmq, int flags) struct mbuf *m; struct mbuf_list ml; struct m_tag *mtag; - u_int32_t ipsecflowinfo = 0; mq_delist(mq, &ml); if (ml_empty(&ml)) @@ -1848,6 +1847,8 @@ ip_send_do_dispatch(void *xmq, int flags) NET_LOCK(); while ((m = ml_dequeue(&ml)) != NULL) { + u_int32_t ipsecflowinfo = 0; + if ((mtag = m_tag_find(m, PACKET_TAG_IPSEC_FLOWINFO, NULL)) != NULL) { ipsecflowinfo = *(u_int32_t *)(mtag + 1); |