The branch main has been updated by kp:

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

commit 65832496f4e75482cb988e524cbf5ef8e5c12c47
Author:     Kristof Provost <k...@freebsd.org>
AuthorDate: 2025-02-05 16:36:29 +0000
Commit:     Kristof Provost <k...@freebsd.org>
CommitDate: 2025-02-12 19:38:38 +0000

    pf: set osport and odport in pf_setup_pdesc()
    
    Set up osport and odport (original src/dst port) in pf_setup_pdesc already.
    Need that for upcoming changes. ok ryan
    
    Obtained from:  OpenBSD, henning <henn...@openbsd.org>, f82a6f97e0
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netpfil/pf/pf.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 17c23f6d4194..874fd0678f7a 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -10180,6 +10180,12 @@ pf_setup_pdesc(sa_family_t af, int dir, struct 
pf_pdesc *pd, struct mbuf **m0,
        }
 #endif
        }
+
+       if (pd->sport)
+               pd->osport = pd->nsport = *pd->sport;
+       if (pd->dport)
+               pd->odport = pd->ndport = *pd->dport;
+
        return (0);
 }
 

Reply via email to