summaryrefslogtreecommitdiffstats
path: root/proto/bgp/bgp.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2008-10-26 22:48:02 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2008-10-26 22:48:02 +0100
commitba5ed6f3e4eb4b2899cdad08e2edb99063bfbcee (patch)
tree794368482cc653d27694ba541b9455c2863c2321 /proto/bgp/bgp.c
parent4847a894bf7d4852325c3f1ea4bb4890054a1f66 (diff)
downloadbird-ba5ed6f3e4eb4b2899cdad08e2edb99063bfbcee.tar
bird-ba5ed6f3e4eb4b2899cdad08e2edb99063bfbcee.zip
Implementation of an option for disabling AS4 support per BGP instance.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r--proto/bgp/bgp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 5fa1249..0d580be 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -636,9 +636,11 @@ 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))
+ if (!bgp_as4_support && c->enable_as4)
+ cf_error("AS4 support disabled globbaly");
+ if (!c->enable_as4 && (c->local_as > 0xFFFF))
cf_error("Local AS number out of range");
- if (!bgp_as4_support && (c->remote_as > 0xFFFF))
+ if (!c->enable_as4 && (c->remote_as > 0xFFFF))
cf_error("Neighbor AS number out of range");
if ((c->local_as != c->remote_as) && (c->rr_client))
cf_error("Only internal neighbor can be RR client");