From 087cecd0e2db0ec1e630fde67ec560578264bf32 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Tue, 13 Jul 2010 12:48:23 +0200 Subject: Adds some options and documentation related to recursive next hops. --- proto/bgp/packets.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'proto/bgp/packets.c') diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index ee2c1b0..6e23022 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -807,8 +807,7 @@ bgp_set_next_hop(struct bgp_proto *p, rta *a) struct eattr *nh = ea_find(a->eattrs, EA_CODE(EAP_BGP, BA_NEXT_HOP)); ip_addr nexthop = *(ip_addr *) nh->u.ptr->data; - if (!p->is_internal) /* FIXME better option - */ + if (p->cf->gw_mode == GW_DIRECT) { neighbor *ng = neigh_find(&p->p, &nexthop, 0) ? : p->neigh; if (ng->scope == SCOPE_HOST) @@ -819,7 +818,7 @@ bgp_set_next_hop(struct bgp_proto *p, rta *a) a->iface = ng->iface; a->hostentry = NULL; } - else + else /* GW_RECURSIVE */ rta_set_recursive_next_hop(p->p.table, a, p->igp_table, &nexthop); return 1; -- cgit v1.2.3