mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-25 08:16:38 +00:00
Merge pull request #3466 from donaldsharp/fib_only
zebra: For rnh handling use actual resolved nexthop
This commit is contained in:
commit
f1663c1eae
@ -528,8 +528,7 @@ static void zebra_rnh_process_pbr_tables(int family,
|
|||||||
*/
|
*/
|
||||||
static bool rnh_nexthop_valid(const struct nexthop *nh)
|
static bool rnh_nexthop_valid(const struct nexthop *nh)
|
||||||
{
|
{
|
||||||
return ((CHECK_FLAG(nh->flags, NEXTHOP_FLAG_FIB)
|
return (CHECK_FLAG(nh->flags, NEXTHOP_FLAG_FIB)
|
||||||
|| CHECK_FLAG(nh->flags, NEXTHOP_FLAG_RECURSIVE))
|
|
||||||
&& CHECK_FLAG(nh->flags, NEXTHOP_FLAG_ACTIVE));
|
&& CHECK_FLAG(nh->flags, NEXTHOP_FLAG_ACTIVE));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -581,8 +580,7 @@ zebra_rnh_resolve_nexthop_entry(struct zebra_vrf *zvrf, int family,
|
|||||||
/* Just being SELECTED isn't quite enough - must
|
/* Just being SELECTED isn't quite enough - must
|
||||||
* have an installed nexthop to be useful.
|
* have an installed nexthop to be useful.
|
||||||
*/
|
*/
|
||||||
for (nexthop = re->ng.nexthop; nexthop;
|
for (ALL_NEXTHOPS(re->ng, nexthop)) {
|
||||||
nexthop = nexthop->next) {
|
|
||||||
if (rnh_nexthop_valid(nexthop))
|
if (rnh_nexthop_valid(nexthop))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -915,7 +913,7 @@ static int send_client(struct rnh *rnh, struct zserv *client, rnh_type_t type,
|
|||||||
num = 0;
|
num = 0;
|
||||||
nump = stream_get_endp(s);
|
nump = stream_get_endp(s);
|
||||||
stream_putc(s, 0);
|
stream_putc(s, 0);
|
||||||
for (nh = re->ng.nexthop; nh; nh = nh->next)
|
for (ALL_NEXTHOPS(re->ng, nh))
|
||||||
if (rnh_nexthop_valid(nh)) {
|
if (rnh_nexthop_valid(nh)) {
|
||||||
stream_putl(s, nh->vrf_id);
|
stream_putl(s, nh->vrf_id);
|
||||||
stream_putc(s, nh->type);
|
stream_putc(s, nh->type);
|
||||||
|
Loading…
Reference in New Issue
Block a user