From 11cb620266035ffbe17b21c4a174380cb8b6a521 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sun, 26 Oct 2008 22:36:08 +0100 Subject: Implementation of 4B ASN support for BGP --- proto/bgp/config.Y | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'proto/bgp/config.Y') diff --git a/proto/bgp/config.Y b/proto/bgp/config.Y index 52ad731..63dfb61 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; } -- cgit v1.2.3