summaryrefslogtreecommitdiffstats
path: root/sbin/pfctl
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2016-08-09 03:39:21 +0000
committerloos <loos@FreeBSD.org>2016-08-09 03:39:21 +0000
commit08ca87d4e72ca7f1aef923a5002c1b9a3bf6b101 (patch)
tree4bb3db87cf5bf2043f07955a64c6eff9edac58e0 /sbin/pfctl
parentb59b5a350df2ca673151ee32a08b525949bac09e (diff)
downloadFreeBSD-src-08ca87d4e72ca7f1aef923a5002c1b9a3bf6b101.zip
FreeBSD-src-08ca87d4e72ca7f1aef923a5002c1b9a3bf6b101.tar.gz
MFC r303760:
Fix a regression in pf.conf while parsing the 'interval' keyword. The bug was introduced by r287009. PR: 210924 Submitted by: kp@ Sponsored by: Rubicon Communications (Netgate) Pointy hat to: loos Approved by: re (gjb)
Diffstat (limited to 'sbin/pfctl')
-rw-r--r--sbin/pfctl/parse.y10
1 files changed, 10 insertions, 0 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index e0cfa3d..5ef70de 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -4460,6 +4460,16 @@ timeout_spec : STRING NUMBER
}
free($1);
}
+ | INTERVAL NUMBER {
+ if (check_rulestate(PFCTL_STATE_OPTION))
+ YYERROR;
+ if ($2 < 0 || $2 > UINT_MAX) {
+ yyerror("only positive values permitted");
+ YYERROR;
+ }
+ if (pfctl_set_timeout(pf, "interval", $2, 0) != 0)
+ YYERROR;
+ }
;
timeout_list : timeout_list comma timeout_spec optnl
OpenPOWER on IntegriCloud