]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Update nexthops when lookup mode changes
authorNathan Bahr <nbahr@atcorp.com>
Fri, 25 Oct 2024 19:10:17 +0000 (19:10 +0000)
committerNathan Bahr <nbahr@atcorp.com>
Fri, 13 Dec 2024 17:36:34 +0000 (17:36 +0000)
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>
pimd/pim_nb_config.c
pimd/pim_nht.h

index 596c949b0df4b5a42bfa1efe6a333b0784b64067..5b418f2597938afe2dee1e789bca15352cc7683f 100644 (file)
@@ -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;
        }
 
index 0d185aad03d3174386be34e5715801cb6106b625..144139f406fad132ded977d47b12bb6a45289797 100644 (file)
@@ -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);