summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2007-01-26 21:34:22 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2007-01-26 21:34:22 +0000
commit2e4959060e5112c379f473bde9f4d8047f6174d0 (patch)
treed5576fae4282610fe915adede2a5d39b3fff23a3 /usr.sbin
parent9b9482005585900c77dc2a9a611fcb577af3deb1 (diff)
AS 65535 aka USHRT_MAX is reserved and may not be used so adapt the
range check. Found while hacking on 4-byte AS support.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 4d5b93f9755..556ffe943f3 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.198 2006/12/05 12:08:13 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.199 2007/01/26 21:34:21 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -217,8 +217,8 @@ number : STRING {
;
asnumber : number {
- if ($1 > USHRT_MAX) {
- yyerror("AS too big: max %u", USHRT_MAX);
+ if ($1 >= USHRT_MAX) {
+ yyerror("AS too big: max %u", USHRT_MAX - 1);
YYERROR;
}
}