diff options
author | 2003-08-25 17:44:44 +0000 | |
---|---|---|
committer | 2003-08-25 17:44:44 +0000 | |
commit | 3b87ffaca56080b16b20332c0c1a1b4a8ed97aa4 (patch) | |
tree | bf7ecbc6b8ba596baf35a4bf8970dcdc4c14225f | |
parent | string shit (diff) | |
download | wireguard-openbsd-3b87ffaca56080b16b20332c0c1a1b4a8ed97aa4.tar.xz wireguard-openbsd-3b87ffaca56080b16b20332c0c1a1b4a8ed97aa4.zip |
catch return-rst ttl values > 255, from aaron@
-rw-r--r-- | sbin/pfctl/parse.y | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index c3eb7faf739..11a938ca078 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.411 2003/08/24 13:02:28 cedric Exp $ */ +/* $OpenBSD: parse.y,v 1.412 2003/08/25 17:44:44 dhartmei Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -1600,6 +1600,10 @@ blockspec : /* empty */ { $$.w2 = 0; } | RETURNRST '(' TTL number ')' { + if ($4 > 255) { + yyerror("illegal ttl value %d", $4); + YYERROR; + } $$.b2 = PFRULE_RETURNRST; $$.w = $4; $$.w2 = 0; |