<tag><label id="bgp-iface">interface <m/string/</tag>
Define interface we should use for link-local BGP IPv6 sessions.
Interface can also be specified as a part of <cf/neighbor address/
- (e.g., <cf/neighbor fe80::1234%eth0 as 65000;/). It is an error to use
- this parameter for non link-local sessions.
+ (e.g., <cf/neighbor fe80::1234%eth0 as 65000;/). The option may also be
+ used for non link-local sessions when it is necessary to explicitly
+ specify an interface, but only for direct (not multihop) sessions.
<tag><label id="bgp-direct">direct</tag>
Specify that the neighbor is directly connected. The IP address of the
{
struct bgp_proto *p = (struct bgp_proto *) pc->proto;
if (ipa_equal(p->cf->remote_ip, sk->daddr) &&
- (!ipa_is_link_local(sk->daddr) || (p->cf->iface == sk->iface)))
+ (!p->cf->iface || (p->cf->iface == sk->iface)))
return p;
}
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 (ipa_is_link_local(c->remote_ip) && !c->iface)
+ cf_error("Link-local neighbor address requires specified interface");
if (!(c->capabilities && c->enable_as4) && (c->remote_as > 0xFFFF))
cf_error("Neighbor AS number out of range (AS4 not available)");
ipa_is_link_local(c->source_addr)))
cf_error("Multihop BGP cannot be used with link-local addresses");
+ if (c->multihop && c->iface)
+ cf_error("Multihop BGP cannot be bound to interface");
+
if (c->multihop && c->check_link)
cf_error("Multihop BGP cannot depend on link state");