summaryrefslogtreecommitdiffstats
path: root/proto/bgp/attrs.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-12-15 00:32:13 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2009-12-15 00:32:13 +0100
commit0225ea4eddb44bd9dd4f112e512325cbf80134d3 (patch)
tree3c9eebfd8217b178ed09f356b1e6bbd7aba89c64 /proto/bgp/attrs.c
parent43c1ceccb9caf8c4f63f191346c2f33889b4ad22 (diff)
parentf2d7da742bd683b8eaecb1be8e3b04618171c796 (diff)
downloadbird-0225ea4eddb44bd9dd4f112e512325cbf80134d3.tar
bird-0225ea4eddb44bd9dd4f112e512325cbf80134d3.zip
Merge branch 'ospf3' into new
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r--proto/bgp/attrs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index ec81bd0..a0f1821 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -864,10 +864,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);