diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2003-08-25 17:44:45 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2003-08-25 17:44:45 +0000 |
commit | 929d7c4322d68ec2ef963a43fdba732f42679ad9 (patch) | |
tree | ec5113ad7668f4ea017455e5578ff0953094c3b0 /sbin/pfctl/parse.y | |
parent | 0b96884198ddad29234100ecdeb8c5d77c78bb23 (diff) |
catch return-rst ttl values > 255, from aaron@
Diffstat (limited to 'sbin/pfctl/parse.y')
-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; |