diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 7b29576fe2ca..e5ab534b83e4 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