Skip to content

Commit

Permalink
pimd: Update nexthops when lookup mode changes
Browse files Browse the repository at this point in the history
Link up the RPF lookup mode changing to a force update to RP's and
upstreams registered for nexthop lookup cache updates.

Signed-off-by: Nathan Bahr <[email protected]>
  • Loading branch information
nabahr committed Dec 13, 2024
1 parent 6d30c8f commit 9ce7f9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pimd/pim_nb_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,12 @@ int routing_control_plane_protocols_control_plane_protocol_pim_address_family_mc
old_mode = pim->rpf_mode;
pim->rpf_mode = yang_dnode_get_enum(args->dnode, NULL);

/* TODO: Signal to redo lookups? */
if (pim->rpf_mode != old_mode &&
/* MCAST_MIX_MRIB_FIRST is the default if not configured */
(old_mode != MCAST_NO_CONFIG && pim->rpf_mode != MCAST_MIX_MRIB_FIRST)) {
pim_nht_mode_changed(pim);
}

break;
}

Expand Down
3 changes: 3 additions & 0 deletions pimd/pim_nht.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ int pim_nht_lookup_ecmp_if_vif_index(struct pim_instance *pim, pim_addr src, str
/* Tracked nexthop update from zebra */
void pim_nexthop_update(struct vrf *vrf, struct prefix *match, struct zapi_route *nhr);

/* RPF lookup mode changed via configuration */
void pim_nht_mode_changed(struct pim_instance *pim);

/* NHT init and finish funcitons */
void pim_nht_init(struct pim_instance *pim);
void pim_nht_terminate(struct pim_instance *pim);
Expand Down

0 comments on commit 9ce7f9b

Please sign in to comment.