mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 10:49:24 +00:00
zebra: slight mods to commit for nexthop resolution with /32 nexthop
Contains minor changes in response to code review comments. Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
This commit is contained in:
parent
fd7fd9e5c4
commit
6f593e8003
@ -376,7 +376,6 @@ static int zebra_rnh_apply_nht_rmap(int family, struct route_node *prn,
|
|||||||
static
|
static
|
||||||
struct route_entry *zebra_rnh_resolve_import_entry(vrf_id_t vrfid,
|
struct route_entry *zebra_rnh_resolve_import_entry(vrf_id_t vrfid,
|
||||||
int family,
|
int family,
|
||||||
rnh_type_t type,
|
|
||||||
struct route_node *nrn,
|
struct route_node *nrn,
|
||||||
struct rnh *rnh,
|
struct rnh *rnh,
|
||||||
struct route_node **prn)
|
struct route_node **prn)
|
||||||
@ -398,12 +397,8 @@ struct route_entry *zebra_rnh_resolve_import_entry(vrf_id_t vrfid,
|
|||||||
/* Unlock route node - we don't need to lock when walking the tree. */
|
/* Unlock route node - we don't need to lock when walking the tree. */
|
||||||
route_unlock_node(rn);
|
route_unlock_node(rn);
|
||||||
|
|
||||||
/* When resolving nexthops, do not resolve via the default route unless
|
if (CHECK_FLAG(rnh->flags, ZEBRA_NHT_EXACT_MATCH) &&
|
||||||
* 'ip nht resolve-via-default' is configured.
|
!prefix_same(&nrn->p, &rn->p))
|
||||||
*/
|
|
||||||
if (((is_default_prefix(&rn->p)) ||
|
|
||||||
((CHECK_FLAG(rnh->flags, ZEBRA_NHT_EXACT_MATCH)) &&
|
|
||||||
!prefix_same(&nrn->p, &rn->p))))
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Identify appropriate route entry. */
|
/* Identify appropriate route entry. */
|
||||||
@ -784,7 +779,7 @@ static void zebra_rnh_evaluate_entry(vrf_id_t vrfid, int family, int force,
|
|||||||
|
|
||||||
/* Identify route entry (RE) resolving this tracked entry. */
|
/* Identify route entry (RE) resolving this tracked entry. */
|
||||||
if (type == RNH_IMPORT_CHECK_TYPE)
|
if (type == RNH_IMPORT_CHECK_TYPE)
|
||||||
re = zebra_rnh_resolve_import_entry(vrfid, family, type, nrn,
|
re = zebra_rnh_resolve_import_entry(vrfid, family, nrn,
|
||||||
rnh, &prn);
|
rnh, &prn);
|
||||||
else
|
else
|
||||||
re = zebra_rnh_resolve_nexthop_entry(vrfid, family, nrn, rnh,
|
re = zebra_rnh_resolve_nexthop_entry(vrfid, family, nrn, rnh,
|
||||||
@ -825,7 +820,7 @@ static void zebra_rnh_clear_nhc_flag(vrf_id_t vrfid, int family,
|
|||||||
|
|
||||||
/* Identify route entry (RIB) resolving this tracked entry. */
|
/* Identify route entry (RIB) resolving this tracked entry. */
|
||||||
if (type == RNH_IMPORT_CHECK_TYPE)
|
if (type == RNH_IMPORT_CHECK_TYPE)
|
||||||
re = zebra_rnh_resolve_import_entry(vrfid, family, type, nrn,
|
re = zebra_rnh_resolve_import_entry(vrfid, family, nrn,
|
||||||
rnh, &prn);
|
rnh, &prn);
|
||||||
else
|
else
|
||||||
re = zebra_rnh_resolve_nexthop_entry(vrfid, family, nrn, rnh,
|
re = zebra_rnh_resolve_nexthop_entry(vrfid, family, nrn, rnh,
|
||||||
|
Loading…
Reference in New Issue
Block a user