mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-28 17:01:51 +00:00
*: Rename ZEBRA_FLAG_INTERNAL -> ZEBRA_FLAG_ALLOW_RECURSION
The ZEBRA_FLAG_INTERNAL flag is used to signal to zebra that the route being added, the nexthops for it can be recursively resolved. This name keeps throwing me off when I read it so let's rename to something that allows the developer to understand what is going on. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
3eef1b20ea
commit
4e8b02f4df
@ -1026,14 +1026,14 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
|
||||
if (peer->sort == BGP_PEER_IBGP || peer->sort == BGP_PEER_CONFED
|
||||
|| info->sub_type == BGP_ROUTE_AGGREGATE) {
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_IBGP);
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_INTERNAL);
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION);
|
||||
}
|
||||
|
||||
if ((peer->sort == BGP_PEER_EBGP && peer->ttl != 1)
|
||||
|| CHECK_FLAG(peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK)
|
||||
|| bgp_flag_check(bgp, BGP_FLAG_DISABLE_NH_CONNECTED_CHK))
|
||||
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_INTERNAL);
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION);
|
||||
|
||||
/* Metric is currently based on the best-path only */
|
||||
metric = info->attr->med;
|
||||
@ -1265,14 +1265,14 @@ void bgp_zebra_withdraw(struct prefix *p, struct bgp_info *info, safi_t safi)
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE);
|
||||
|
||||
if (peer->sort == BGP_PEER_IBGP) {
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_INTERNAL);
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION);
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_IBGP);
|
||||
}
|
||||
|
||||
if ((peer->sort == BGP_PEER_EBGP && peer->ttl != 1)
|
||||
|| CHECK_FLAG(peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK)
|
||||
|| bgp_flag_check(peer->bgp, BGP_FLAG_DISABLE_NH_CONNECTED_CHK))
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_INTERNAL);
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION);
|
||||
|
||||
if (bgp_debug_zebra(p)) {
|
||||
char buf[PREFIX_STRLEN];
|
||||
|
@ -402,7 +402,7 @@ extern const char *zserv_command_string(unsigned int command);
|
||||
#define strmatch(a,b) (!strcmp((a), (b)))
|
||||
|
||||
/* Zebra message flags */
|
||||
#define ZEBRA_FLAG_INTERNAL 0x01
|
||||
#define ZEBRA_FLAG_ALLOW_RECURSION 0x01
|
||||
#define ZEBRA_FLAG_SELFROUTE 0x02
|
||||
#define ZEBRA_FLAG_IBGP 0x08
|
||||
#define ZEBRA_FLAG_SELECTED 0x10
|
||||
|
@ -114,7 +114,7 @@ void nhrp_route_announce(int add, enum nhrp_cache_type type, const struct prefix
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_FIB_OVERRIDE);
|
||||
break;
|
||||
}
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_INTERNAL);
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION);
|
||||
|
||||
SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
|
||||
api.nexthop_num = 1;
|
||||
|
@ -167,9 +167,9 @@ T26 DONE Zebra daemon is marking recursive static route as inactive.
|
||||
pointing to kernel routes as inactive:
|
||||
zebra/zebra_rib.c nexthop_active_ipv4:
|
||||
-- Original:
|
||||
else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL))
|
||||
else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_ALLOW_RECURSION))
|
||||
-- Fixed:
|
||||
else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL) ||
|
||||
else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_ALLOW_RECURSION) ||
|
||||
match->type == ZEBRA_ROUTE_KERNEL)
|
||||
|
||||
Old problem description:
|
||||
|
@ -514,7 +514,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
|
||||
nexthop->ifindex = newhop->ifindex;
|
||||
}
|
||||
return 1;
|
||||
} else if (CHECK_FLAG(re->flags, ZEBRA_FLAG_INTERNAL)) {
|
||||
} else if (CHECK_FLAG(re->flags, ZEBRA_FLAG_ALLOW_RECURSION)) {
|
||||
resolved = 0;
|
||||
for (ALL_NEXTHOPS(match->nexthop, newhop)) {
|
||||
if (!CHECK_FLAG(newhop->flags,
|
||||
|
Loading…
Reference in New Issue
Block a user