summaryrefslogtreecommitdiff
path: root/pimd
diff options
context:
space:
mode:
authorNathan Bahr <nbahr@atcorp.com>2024-10-25 19:10:17 +0000
committerNathan Bahr <nbahr@atcorp.com>2024-12-13 17:36:34 +0000
commit9ce7f9b8e873fc287126af1bf07450f433685ce1 (patch)
tree0992abe44175a5e70c5298f7a18f4ef2e68cb38f /pimd
parent6d30c8f6b53a7d453f455e28615a57a6aadc0660 (diff)
pimd: Update nexthops when lookup mode changes
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 <nbahr@atcorp.com>
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim_nb_config.c7
-rw-r--r--pimd/pim_nht.h3
2 files changed, 9 insertions, 1 deletions
diff --git a/pimd/pim_nb_config.c b/pimd/pim_nb_config.c
index 596c949b0d..5b418f2597 100644
--- a/pimd/pim_nb_config.c
+++ b/pimd/pim_nb_config.c
@@ -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;
}
diff --git a/pimd/pim_nht.h b/pimd/pim_nht.h
index 0d185aad03..144139f406 100644
--- a/pimd/pim_nht.h
+++ b/pimd/pim_nht.h
@@ -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);