summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r--proto/bgp/bgp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 016d3e60..07fd8478 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -1196,9 +1196,18 @@ bgp_check_config(struct bgp_config *c)
if (!c->local_as)
cf_error("Local AS number must be set");
- if (!c->remote_as)
+ if (ipa_zero(c->remote_ip))
cf_error("Neighbor must be configured");
+ if (!c->remote_as)
+ cf_error("Remote AS number must be set");
+
+ // if (ipa_is_link_local(c->remote_ip) && !c->iface)
+ // cf_error("Link-local neighbor address requires specified interface");
+
+ if (!ipa_is_link_local(c->remote_ip) != !c->iface)
+ cf_error("Link-local address and interface scope must be used together");
+
if (!(c->capabilities && c->enable_as4) && (c->remote_as > 0xFFFF))
cf_error("Neighbor AS number out of range (AS4 not available)");