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
This commit is contained in:
Luiz Otavio O Souza 2016-08-05 02:19:03 +00:00
parent 13cfafabf4
commit 7f8af000a9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=303760

View File

@ -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