From 4827b69ff43661f4f34d437999b0edaac76f7355 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Wed, 29 Apr 2009 18:58:24 +0200 Subject: 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. --- proto/bgp/bgp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'proto/bgp/bgp.c') diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index a0bc892..cbc699b 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 -- cgit v1.2.3