diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index c7727d8a3a3..9f22b7391ee 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -3607,7 +3607,7 @@ tos : STRING { } | NUMBER { $$ = $1; - if (!$$ || $$ > 255) { + if ($$ < 0 || $$ > 255) { yyerror("illegal tos value %s", $1); YYERROR; }