summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-04-29 18:58:24 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-04-29 18:58:24 +0200
commit4827b69ff43661f4f34d437999b0edaac76f7355 (patch)
tree4e36a37b04fa4ba6bf363887fe4ecc65016e7fee /proto/bgp/bgp.c
parentad440a570b37e8674ef35f3a18df48f0eb2579eb (diff)
Fixes BGP IPv6 link local next hop handling.
When sending 'third party' BGP update, Bird used bogus link local addresses instead of addresses it received before.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r--proto/bgp/bgp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index a0bc8923..cbc699bb 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -612,13 +612,17 @@ bgp_start_neighbor(struct bgp_proto *p)
#ifdef IPV6
{
struct ifa *a;
- p->local_link = ipa_or(ipa_build(0xfe80,0,0,0), ipa_and(p->local_addr, ipa_build(0,0,~0,~0)));
+ p->local_link = IPA_NONE;
WALK_LIST(a, p->neigh->iface->addrs)
if (a->scope == SCOPE_LINK)
{
p->local_link = a->ip;
break;
}
+
+ if (! ipa_nonzero(p->local_link))
+ log(L_WARN "%s: Missing link local address on interface %s", p->p.name, p->neigh->iface->name);
+
DBG("BGP: Selected link-level address %I\n", p->local_link);
}
#endif