diff options
author | loos <loos@FreeBSD.org> | 2016-08-09 03:47:38 +0000 |
---|---|---|
committer | loos <loos@FreeBSD.org> | 2016-08-09 03:47:38 +0000 |
commit | bf3693f48b1a845cbd0c49bc32044d459a3986f5 (patch) | |
tree | d433cd2e23f3cefe4efae078b9c58bb4548c62d2 | |
parent | d6e90c4a08b4537b16c93cce7b177f33bd48f2dd (diff) | |
download | FreeBSD-src-bf3693f48b1a845cbd0c49bc32044d459a3986f5.zip FreeBSD-src-bf3693f48b1a845cbd0c49bc32044d459a3986f5.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)
-rw-r--r-- | sbin/pfctl/parse.y | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index b0aa622..56ccd11 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -4384,6 +4384,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 |