Hi
BIRD does not handle well situations where there are overlapping IP
ranges on interfaces. It just find a first iface that matches the
next-hop.
It is true that one would expect that in 'direct' mode, the iface is used
also for the next hop, but even in that case BGP is two-level and BGP next
hop is resolved through iface prefixes to find the next hop iface.
You could try attached patch that will change the behavior that in 'direct'
mode always use the iface over which the BGP session is configured.
--
Elen sila lumenn' omentielvo
Ondrej 'Santiago' Zajicek (email: [email protected])
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c
index ab87bdcc..66bfe62a 100644
--- a/proto/bgp/packets.c
+++ b/proto/bgp/packets.c
@@ -1163,7 +1163,7 @@ bgp_set_next_hop(struct bgp_proto *p, rta *a)
neighbor *ng = NULL;
if (ipa_nonzero(*nexthop))
- ng = neigh_find(&p->p, nexthop, 0);
+ ng = neigh_find2(&p->p, nexthop, p->neigh->iface, 0);
else if (second) /* GW_DIRECT -> single_hop -> p->neigh != NULL */
ng = neigh_find2(&p->p, nexthop + 1, p->neigh->iface, 0);