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/bgp.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'proto/bgp/bgp.c') diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index cedd223..ed2524c 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -76,6 +76,7 @@ static void bgp_connect(struct bgp_proto *p); static void bgp_initiate(struct bgp_proto *p); static void bgp_setup_listen_sk(void); + static void bgp_close(struct bgp_proto *p UNUSED) { @@ -611,6 +612,10 @@ bgp_check(struct bgp_config *c) cf_error("Local AS number must be set"); if (!c->remote_as) cf_error("Neighbor must be configured"); + if (!bgp_as4_support && (c->local_as > 0xFFFF)) + cf_error("Local AS number out of range"); + if (!bgp_as4_support && (c->remote_as > 0xFFFF)) + cf_error("Neighbor AS number out of range"); } static void -- cgit v1.2.3