From f2d7da742bd683b8eaecb1be8e3b04618171c796 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Tue, 15 Dec 2009 00:30:07 +0100 Subject: Fixes export of routes with link-local gw. --- proto/bgp/attrs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'proto/bgp') diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 7b49bdf..801fe10 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -877,10 +877,12 @@ bgp_create_attrs(struct bgp_proto *p, rte *e, ea_list **attrs, struct linpool *p z = bgp_set_attr_wa(ea->attrs+2, pool, BA_NEXT_HOP, NEXT_HOP_LENGTH); if (p->cf->next_hop_self || rta->dest != RTD_ROUTER || - (!p->is_internal && (e->attrs->iface != p->neigh->iface))) + ipa_equal(e->attrs->gw, IPA_NONE) || + ipa_has_link_scope(rta->gw) || + (!p->is_internal && (rta->iface != p->neigh->iface))) set_next_hop(z, p->source_addr); else - set_next_hop(z, e->attrs->gw); + set_next_hop(z, rta->gw); bgp_set_attr(ea->attrs+3, BA_LOCAL_PREF, 0); -- cgit v1.2.3