]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Allow 'third party' BGP updates for originated routes.
authorOndrej Zajicek <santiago@crfreenet.org>
Wed, 29 Apr 2009 20:17:40 +0000 (22:17 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Wed, 29 Apr 2009 20:17:40 +0000 (22:17 +0200)
proto/bgp/attrs.c

index 585bfd1640323cc858a4a23d0d7f0c646a546542..8a849e73cb96ca05cc8d5fde8717f214c50fdcd6 100644 (file)
@@ -788,8 +788,8 @@ 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 ||
-      !p->is_internal ||
-      rta->dest != RTD_ROUTER)
+      rta->dest != RTD_ROUTER ||
+      (!p->is_internal && (e->attrs->iface != p->neigh->iface)))
     set_next_hop(z, p->source_addr);
   else
     set_next_hop(z, e->attrs->gw);