aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2022-09-02 16:36:52 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2022-09-05 13:06:12 +0000
commit9503043f6e64a92d3c35cd8aa932727685378ad0 (patch)
treefde6de7990941ea713e24f9d48984b1fbbeffa0c
parentdb98b4205093a6ee201ce0b8d83c77d5b730d7cb (diff)
downloadsrc-9503043f6e64a92d3c35cd8aa932727685378ad0.tar.gz
src-9503043f6e64a92d3c35cd8aa932727685378ad0.zip
pf: stop using PFIL_FWD
It is only there to check if the packet was reassembled, relevant if we are forwarding. But if the packet originated locally it could not have been reassembled, thus the flag is redundant. Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate")
-rw-r--r--sys/netpfil/pf/pf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index e2f8b428fb14..b46c16659ddb 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -6633,7 +6633,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, int dir, struct ifnet *oifp,
goto bad;
if (dir == PF_IN) {
- if (pf_test6(PF_OUT, PFIL_FWD, ifp, &m0, inp) != PF_PASS)
+ if (pf_test6(PF_OUT, 0, ifp, &m0, inp) != PF_PASS)
goto bad;
else if (m0 == NULL)
goto done;
@@ -7929,7 +7929,7 @@ done:
PF_STATE_UNLOCK(s);
/* If reassembled packet passed, create new fragments. */
- if (action == PF_PASS && *m0 && (pflags & PFIL_FWD) &&
+ if (action == PF_PASS && *m0 && dir == PF_OUT &&
(mtag = m_tag_find(m, PF_REASSEMBLED, NULL)) != NULL)
action = pf_refragment6(ifp, m0, mtag);