git: f1ddd7f1dae6 - main - pf: add forgotten fixup for icmp6 id's when translating
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 17 Dec 2024 10:07:59 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=f1ddd7f1dae6fa3cab8c5044e3b4f719bf93ec97
commit f1ddd7f1dae6fa3cab8c5044e3b4f719bf93ec97
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2024-11-12 10:51:33 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2024-12-17 10:07:15 +0000
pf: add forgotten fixup for icmp6 id's when translating
ok henning
Obtained from: OpenBSD, mikeb <mikeb@openbsd.org>, 7dde5f4db5
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D47799
---
sys/netpfil/pf/pf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 4c1111c6106a..445aef881fe8 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -7815,6 +7815,10 @@ pf_test_state_icmp(struct pf_kstate **state, struct pf_pdesc *pd,
&pd->hdr.icmp6.icmp6_cksum,
&nk->addr[didx], 0);
+ if (nk->port[iidx] != pd->hdr.icmp6.icmp6_id)
+ pd->hdr.icmp6.icmp6_id =
+ nk->port[iidx];
+
m_copyback(pd->m, pd->off, sizeof(struct icmp6_hdr),
(caddr_t )&pd->hdr.icmp6);
break;