diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2003-12-16 01:10:22 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2003-12-16 01:10:22 +0000 |
commit | 248f750ed790d98f0bb4846fee3c8e04c58db602 (patch) | |
tree | 614168427a522e1d17238e1e1ec0827f73b84c15 | |
parent | 4a51c24b641c5183de7d18f21ee48d59da206b27 (diff) |
Check that max-src-states and max-src-nodes are not being set to 0.
-rw-r--r-- | sbin/pfctl/parse.y | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 93b9323376e..861f3542a5a 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.428 2003/12/15 09:12:55 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.429 2003/12/16 01:10:21 mcbride Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -1472,6 +1472,11 @@ pfrule : action dir logquick interface route af proto fromto "multiple definitions"); YYERROR; } + if (o->data.max_src_nodes == 0) { + yyerror("'max-src-states' must " + "be > 0"); + YYERROR; + } r.max_src_states = o->data.max_src_states; r.rule_flag |= PFRULE_SRCTRACK; @@ -1483,6 +1488,11 @@ pfrule : action dir logquick interface route af proto fromto "multiple definitions"); YYERROR; } + if (o->data.max_src_nodes == 0) { + yyerror("'max-src-nodes' must " + "be > 0"); + YYERROR; + } r.max_src_nodes = o->data.max_src_nodes; r.rule_flag |= PFRULE_SRCTRACK; |