summaryrefslogtreecommitdiffstats
path: root/sys/netpfil/pf/pf.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-09-01 13:00:45 +0000
committerglebius <glebius@FreeBSD.org>2014-09-01 13:00:45 +0000
commit0cbf499e97e7e2df822105d60f96901274218bbe (patch)
tree965da3b65f9239a607b6947e265b9431aaaf6d09 /sys/netpfil/pf/pf.c
parent65268873074c1a5601b89f47b69d241655c3d53d (diff)
downloadFreeBSD-src-0cbf499e97e7e2df822105d60f96901274218bbe.zip
FreeBSD-src-0cbf499e97e7e2df822105d60f96901274218bbe.tar.gz
Explicitly free packet on PF_DROP, otherwise a "quick" rule with
"route-to" may still forward it. PR: 177808 Submitted by: Kajetan Staszkiewicz <kajetan.staszkiewicz innogames.de> Sponsored by: InnoGames GmbH
Diffstat (limited to 'sys/netpfil/pf/pf.c')
-rw-r--r--sys/netpfil/pf/pf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index fdf9acc..498a321 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -6000,6 +6000,10 @@ done:
*m0 = NULL;
action = PF_PASS;
break;
+ case PF_DROP:
+ m_freem(*m0);
+ *m0 = NULL;
+ break;
default:
/* pf_route() returns unlocked. */
if (r->rt) {
@@ -6376,6 +6380,10 @@ done:
*m0 = NULL;
action = PF_PASS;
break;
+ case PF_DROP:
+ m_freem(*m0);
+ *m0 = NULL;
+ break;
default:
/* pf_route6() returns unlocked. */
if (r->rt) {
OpenPOWER on IntegriCloud