diff options
Diffstat (limited to 'usr.sbin/bgpd/parse.y')
-rw-r--r-- | usr.sbin/bgpd/parse.y | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index 2ef9f9d1b8a..14afa6318a3 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.233 2009/08/03 13:14:07 claudio Exp $ */ +/* $OpenBSD: parse.y,v 1.234 2009/08/31 13:03:31 claudio Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -211,8 +211,12 @@ grammar : /* empty */ ; asnumber : NUMBER { - if ($1 < 0 || $1 >= ASNUM_MAX) { - yyerror("AS too big: max %u", ASNUM_MAX - 1); + /* + * Accroding to iana 65535 and 4294967295 are reserved + * but enforcing this is not duty of the parser. + */ + if ($1 < 0 || $1 > UINT_MAX) { + yyerror("AS too big: max %u", UINT_MAX); YYERROR; } } |