mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 19:39:28 +00:00
zebra: skip un-installed recursive match
Do less work when resolving a recursive route: just skip nexthops if the resolving route is not installed. Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
0e8542eef3
commit
92ad0c558c
@ -1934,12 +1934,19 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
|
|||||||
|
|
||||||
resolved = 0;
|
resolved = 0;
|
||||||
|
|
||||||
|
/* Only useful if installed */
|
||||||
|
if (!CHECK_FLAG(match->status, ROUTE_ENTRY_INSTALLED)) {
|
||||||
|
if (IS_ZEBRA_DEBUG_NHG_DETAIL)
|
||||||
|
zlog_debug("%s: match %p (%u) not installed",
|
||||||
|
__func__, match,
|
||||||
|
match->nhe->id);
|
||||||
|
|
||||||
|
goto done_with_match;
|
||||||
|
}
|
||||||
|
|
||||||
/* Examine installed nexthops */
|
/* Examine installed nexthops */
|
||||||
nhg = &match->nhe->nhg;
|
nhg = &match->nhe->nhg;
|
||||||
for (ALL_NEXTHOPS_PTR(nhg, newhop)) {
|
for (ALL_NEXTHOPS_PTR(nhg, newhop)) {
|
||||||
if (!CHECK_FLAG(match->status,
|
|
||||||
ROUTE_ENTRY_INSTALLED))
|
|
||||||
continue;
|
|
||||||
if (!nexthop_valid_resolve(nexthop, newhop))
|
if (!nexthop_valid_resolve(nexthop, newhop))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -1960,9 +1967,6 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
|
|||||||
goto done_with_match;
|
goto done_with_match;
|
||||||
|
|
||||||
for (ALL_NEXTHOPS_PTR(nhg, newhop)) {
|
for (ALL_NEXTHOPS_PTR(nhg, newhop)) {
|
||||||
if (!CHECK_FLAG(match->status,
|
|
||||||
ROUTE_ENTRY_INSTALLED))
|
|
||||||
continue;
|
|
||||||
if (!nexthop_valid_resolve(nexthop, newhop))
|
if (!nexthop_valid_resolve(nexthop, newhop))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user