summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2009-04-23 16:20:40 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2009-04-23 16:20:40 +0000
commita1922ecb3dacc7756b30e7bb77fb3d3dc96d6117 (patch)
tree77f9e92cca3b3b503455f1cf86ad956fd23c609b /usr.sbin/bgpd
parentab83a2a0add60b455db120505f68bf69b30cf267 (diff)
allow bgpctl and bgpd.conf to contain 32-bit ASN written in ASPLAIN
format (RFC5396). ok claudio@ henning@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/bgpd.h4
-rw-r--r--usr.sbin/bgpd/parse.y6
2 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h
index 92186d896c9..07554af27d9 100644
--- a/usr.sbin/bgpd/bgpd.h
+++ b/usr.sbin/bgpd/bgpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.h,v 1.228 2009/03/26 13:59:30 henning Exp $ */
+/* $OpenBSD: bgpd.h,v 1.229 2009/04/23 16:20:39 sthen Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -40,6 +40,8 @@
#define IPSEC_ENC_KEY_LEN 32
#define IPSEC_AUTH_KEY_LEN 20
+#define ASNUM_MAX 0xffffffff
+
#define MAX_PKTSIZE 4096
#define MIN_HOLDTIME 3
#define READ_BUF_SIZE 65535
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 08e909d321b..54851ca8269 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.223 2009/03/31 21:03:48 tobias Exp $ */
+/* $OpenBSD: parse.y,v 1.224 2009/04/23 16:20:39 sthen Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -207,8 +207,8 @@ grammar : /* empty */
;
asnumber : NUMBER {
- if ($1 < 0 || $1 >= USHRT_MAX) {
- yyerror("AS too big: max %u", USHRT_MAX - 1);
+ if ($1 < 0 || $1 >= ASNUM_MAX) {
+ yyerror("AS too big: max %u", ASNUM_MAX - 1);
YYERROR;
}
}