aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2016-08-02 15:41:42 +0000
committerKristof Provost <kp@FreeBSD.org>2016-08-02 15:41:42 +0000
commit0cd7a91aa7f5d7600071a257638748aeccc62f8a (patch)
treea528a95d7fa0c36d0f9310ee6284abb6cae19005
parent249a8a8003098e796792e9c523d5211ba8018755 (diff)
Notes
-rw-r--r--sbin/pfctl/parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index e0cfa3d0cad68..cba38fd6f0311 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -3593,8 +3593,8 @@ tos : STRING {
else if ($1[0] == '0' && $1[1] == 'x')
$$ = strtoul($1, NULL, 16);
else
- $$ = 0; /* flag bad argument */
- if (!$$ || $$ > 255) {
+ $$ = 256; /* flag bad argument */
+ if ($$ < 0 || $$ > 255) {
yyerror("illegal tos value %s", $1);
free($1);
YYERROR;
@@ -3603,7 +3603,7 @@ tos : STRING {
}
| NUMBER {
$$ = $1;
- if (!$$ || $$ > 255) {
+ if ($$ < 0 || $$ > 255) {
yyerror("illegal tos value %s", $1);
YYERROR;
}