From 248f750ed790d98f0bb4846fee3c8e04c58db602 Mon Sep 17 00:00:00 2001 From: Ryan Thomas McBride Date: Tue, 16 Dec 2003 01:10:22 +0000 Subject: Check that max-src-states and max-src-nodes are not being set to 0. --- sbin/pfctl/parse.y | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3