summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkp <kp@FreeBSD.org>2017-04-08 09:48:21 +0000
committerLuiz Souza <luiz@netgate.com>2017-07-17 21:59:59 -0500
commit4750f900ae295add02e6a3bed0b1b29a07359607 (patch)
treedc1243a9cce51795694a18cd0a7c939168920f98
parent32f8b013224b51c89efa7bc824ef1fbf351f498b (diff)
downloadFreeBSD-src-4750f900ae295add02e6a3bed0b1b29a07359607.zip
FreeBSD-src-4750f900ae295add02e6a3bed0b1b29a07359607.tar.gz
MFC r316355
pf: Fix leak of pf_state_keys If we hit the state limit we returned from pf_create_state() without cleaning up. PR: 217997 Submitted by: Max <maximos@als.nnov.ru> (cherry picked from commit 649e7ba54470144c01ab6995ee6bd45d9a62bdde)
-rw-r--r--sys/netpfil/pf/pf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 09bdcdb..4ec95e0 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -3687,7 +3687,7 @@ pf_create_state(struct pf_rule *r, struct pf_rule *nr, struct pf_rule *a,
(counter_u64_fetch(r->states_cur) >= r->max_states)) {
counter_u64_add(V_pf_status.lcounters[LCNT_STATES], 1);
REASON_SET(&reason, PFRES_MAXSTATES);
- return (PF_DROP);
+ goto csfailed;
}
/* src node for filter rule */
if ((r->rule_flag & PFRULE_SRCTRACK ||
OpenPOWER on IntegriCloud