summaryrefslogtreecommitdiff
path: root/proto/bgp/config.Y
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2008-10-26 22:36:08 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2008-10-26 22:36:08 +0100
commit11cb620266035ffbe17b21c4a174380cb8b6a521 (patch)
tree09b3aaa27c3a2b3e8f71da5701801679518866cd /proto/bgp/config.Y
parent44cb1449edec6a80e063981a955e8025ee87ea65 (diff)
Implementation of 4B ASN support for BGP
Diffstat (limited to 'proto/bgp/config.Y')
-rw-r--r--proto/bgp/config.Y8
1 files changed, 3 insertions, 5 deletions
diff --git a/proto/bgp/config.Y b/proto/bgp/config.Y
index 52ad731e..63dfb615 100644
--- a/proto/bgp/config.Y
+++ b/proto/bgp/config.Y
@@ -44,12 +44,10 @@ bgp_proto_start: proto_start BGP {
bgp_proto:
bgp_proto_start proto_name '{'
| bgp_proto proto_item ';'
- | bgp_proto LOCAL AS expr ';' {
- if ($4 < 0 || $4 > 65535) cf_error("AS number out of range");
- BGP_CFG->local_as = $4;
- }
+ | bgp_proto LOCAL AS expr ';' { BGP_CFG->local_as = $4; }
| bgp_proto NEIGHBOR ipa AS expr ';' {
- if ($5 < 0 || $5 > 65535) cf_error("AS number out of range");
+ if (ipa_nonzero(BGP_CFG->remote_ip)) cf_error("Only one neighbor per BGP instance is allowed");
+
BGP_CFG->remote_ip = $3;
BGP_CFG->remote_as = $5;
}