forked from Mirror/frr
staticd,zebra: use ALLOW_RECURSION for static routes
Remove a special-case clause for static routes - it was the same as the clause for other recursive routes. Have staticd just tell zebra that recursion is allowed. Update topotest that was aware of this 'internal' flag. Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
5b76e76515
commit
6b193087ca
|
@ -363,6 +363,7 @@ extern void static_zebra_route_add(struct route_node *rn,
|
|||
memcpy(&api.src_prefix, src_pp, sizeof(api.src_prefix));
|
||||
}
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_RR_USE_DISTANCE);
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION);
|
||||
SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
|
||||
if (si_changed->distance) {
|
||||
SET_FLAG(api.message, ZAPI_MESSAGE_DISTANCE);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"installed":true,
|
||||
"table":254,
|
||||
"internalStatus":16,
|
||||
"internalFlags":72,
|
||||
"internalFlags":73,
|
||||
"internalNextHopNum":1,
|
||||
"internalNextHopActiveNum":1,
|
||||
"nexthops":[
|
||||
|
|
|
@ -1953,33 +1953,6 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
|
|||
__func__);
|
||||
|
||||
return resolved;
|
||||
} else if (re->type == ZEBRA_ROUTE_STATIC) {
|
||||
resolved = 0;
|
||||
for (ALL_NEXTHOPS(match->nhe->nhg, newhop)) {
|
||||
if (!CHECK_FLAG(match->status,
|
||||
ROUTE_ENTRY_INSTALLED))
|
||||
continue;
|
||||
if (!nexthop_valid_resolve(nexthop, newhop))
|
||||
continue;
|
||||
|
||||
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
|
||||
zlog_debug("%s: STATIC match %p (%u), newhop %pNHv",
|
||||
__func__, match,
|
||||
match->nhe->id, newhop);
|
||||
|
||||
SET_FLAG(nexthop->flags,
|
||||
NEXTHOP_FLAG_RECURSIVE);
|
||||
nexthop_set_resolved(afi, newhop, nexthop);
|
||||
resolved = 1;
|
||||
}
|
||||
if (resolved)
|
||||
re->nexthop_mtu = match->mtu;
|
||||
|
||||
if (!resolved && IS_ZEBRA_DEBUG_RIB_DETAILED)
|
||||
zlog_debug(
|
||||
" %s: Static route unable to resolve",
|
||||
__func__);
|
||||
return resolved;
|
||||
} else {
|
||||
if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
|
||||
zlog_debug(
|
||||
|
|
Loading…
Reference in a new issue