diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-07-13 12:48:23 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-07-13 12:48:23 +0200 |
commit | 087cecd0e2db0ec1e630fde67ec560578264bf32 (patch) | |
tree | ae14fb43b9010219a20799ab39d13a9d541956f1 /proto/bgp/packets.c | |
parent | f038f0a6385d7b81f57254e3c9bf84021a6b040d (diff) |
Adds some options and documentation related to recursive next hops.
Diffstat (limited to 'proto/bgp/packets.c')
-rw-r--r-- | proto/bgp/packets.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index ee2c1b05..6e230226 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; |