diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2008-10-26 22:36:08 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2008-10-26 22:36:08 +0100 |
commit | 11cb620266035ffbe17b21c4a174380cb8b6a521 (patch) | |
tree | 09b3aaa27c3a2b3e8f71da5701801679518866cd /proto/bgp/bgp.c | |
parent | 44cb1449edec6a80e063981a955e8025ee87ea65 (diff) |
Implementation of 4B ASN support for BGP
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r-- | proto/bgp/bgp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index cedd223b..ed2524c8 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 |