Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 May 2022 15:42:17 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 4d48dd689062 - main - pf: don't reject dummynet-ed packets
Message-ID:  <202205061542.246FgHhd050271@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp:

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

commit 4d48dd68906230f8c41caee6a5c9d7b9f272bdb1
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2022-05-06 14:41:34 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2022-05-06 14:41:34 +0000

    pf: don't reject dummynet-ed packets
    
    If we pass a packet to dummynet we should indicate we've passed it (but
    keep m0 == NULL). Otherwise we'll indicate to the calling layers that
    the packet has been rejected.
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netpfil/pf/pf.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index fd4031ac942c..e9185c4d8587 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -7298,9 +7298,7 @@ done:
 			if (pf_pdesc_to_dnflow(dir, &pd, r, s, &dnflow)) {
 				pd.pf_mtag->flags |= PF_TAG_DUMMYNET;
 				ip_dn_io_ptr(m0, &dnflow);
-				if (*m0 == NULL)
-					action = PF_DROP;
-				else
+				if (*m0 != NULL)
 					pd.pf_mtag->flags &= ~PF_TAG_DUMMYNET;
 			}
 		}
@@ -7758,9 +7756,7 @@ done:
 			if (pf_pdesc_to_dnflow(dir, &pd, r, s, &dnflow)) {
 				pd.pf_mtag->flags |= PF_TAG_DUMMYNET;
 				ip_dn_io_ptr(m0, &dnflow);
-				if (*m0 == NULL)
-					action = PF_DROP;
-				else
+				if (*m0 != NULL)
 					pd.pf_mtag->flags &= ~PF_TAG_DUMMYNET;
 			}
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202205061542.246FgHhd050271>