summaryrefslogtreecommitdiffstats
path: root/proto/bgp/packets.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-07-13 12:48:23 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-07-13 12:48:23 +0200
commit087cecd0e2db0ec1e630fde67ec560578264bf32 (patch)
treeae14fb43b9010219a20799ab39d13a9d541956f1 /proto/bgp/packets.c
parentf038f0a6385d7b81f57254e3c9bf84021a6b040d (diff)
downloadbird-087cecd0e2db0ec1e630fde67ec560578264bf32.tar
bird-087cecd0e2db0ec1e630fde67ec560578264bf32.zip
Adds some options and documentation related to recursive next hops.
Diffstat (limited to 'proto/bgp/packets.c')
-rw-r--r--proto/bgp/packets.c5
1 files changed, 2 insertions, 3 deletions
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;