git: ff1aec7ccb54 - main - ipfw: do not reset fwmark when one_pass is disabled.

From: Andrey V. Elsukov <ae_at_FreeBSD.org>
Date: Mon, 02 Dec 2024 09:44:02 UTC
The branch main has been updated by ae:

URL: https://cgit.FreeBSD.org/src/commit/?id=ff1aec7ccb547b778c7fb2263ecb50ceeea971f5

commit ff1aec7ccb547b778c7fb2263ecb50ceeea971f5
Author:     Andrey V. Elsukov <ae@FreeBSD.org>
AuthorDate: 2024-12-02 09:41:11 +0000
Commit:     Andrey V. Elsukov <ae@FreeBSD.org>
CommitDate: 2024-12-02 09:41:11 +0000

    ipfw: do not reset fwmark when one_pass is disabled.
    
    Fixes:  fc727ad63d3f8
    MFC after:      1 week
---
 sys/netpfil/ipfw/ip_fw_pfil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c
index 4dae28aa0544..ddd8e00316b8 100644
--- a/sys/netpfil/ipfw/ip_fw_pfil.c
+++ b/sys/netpfil/ipfw/ip_fw_pfil.c
@@ -127,6 +127,7 @@ ipfw_check_packet(struct mbuf **m0, struct ifnet *ifp, int flags,
 	int ipfw;
 
 	args.flags = (flags & PFIL_IN) ? IPFW_ARGS_IN : IPFW_ARGS_OUT;
+	args.rule.pkt_mark = 0;
 again:
 	/*
 	 * extract and remove the tag if present. If we are left
@@ -144,7 +145,6 @@ again:
 	args.m = *m0;
 	args.ifp = ifp;
 	args.inp = inp;
-	args.rule.pkt_mark = 0;
 
 	ipfw = ipfw_chk(&args);
 	*m0 = args.m;