]> git.puffer.fish Git - mirror/frr.git/commitdiff
pim6d: Modify pim_rp_g for PIMv4/PIMv6
authorMobashshera Rasool <mrasool@vmware.com>
Mon, 21 Feb 2022 11:27:35 +0000 (03:27 -0800)
committerMobashshera Rasool <mrasool@vmware.com>
Tue, 8 Mar 2022 08:57:51 +0000 (00:57 -0800)
Modify pim_rp_g to support PIMv6.
Remove it from stub.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
pimd/pim_rp.c

index e8c5c4ddb37d9674e0c83c3590763e4a0a3b1f40..b3ba40f3fe1733f9a75cdc3f4e665520732e1e34 100644 (file)
@@ -1065,7 +1065,6 @@ int pim_rp_i_am_rp(struct pim_instance *pim, pim_addr group)
        return 0;
 }
 
-#if PIM_IPV == 4
 /*
  * RP(G)
  *
@@ -1077,9 +1076,7 @@ struct pim_rpf *pim_rp_g(struct pim_instance *pim, pim_addr group)
        struct rp_info *rp_info;
 
        memset(&g, 0, sizeof(g));
-       g.family = AF_INET;
-       g.prefixlen = IPV4_MAX_BITLEN;
-       g.u.prefix4 = group;
+       pim_addr_to_prefix(&g, group);
 
        rp_info = pim_rp_find_match_group(pim, &g);
 
@@ -1087,9 +1084,7 @@ struct pim_rpf *pim_rp_g(struct pim_instance *pim, pim_addr group)
                struct prefix nht_p;
 
                /* Register addr with Zebra NHT */
-               nht_p.family = AF_INET;
-               nht_p.prefixlen = IPV4_MAX_BITLEN;
-               nht_p.u.prefix4 = rp_info->rp.rpf_addr.u.prefix4;
+               nht_p = rp_info->rp.rpf_addr;
                if (PIM_DEBUG_PIM_NHT_RP)
                        zlog_debug(
                                "%s: NHT Register RP addr %pFX grp %pFX with Zebra",
@@ -1105,15 +1100,6 @@ struct pim_rpf *pim_rp_g(struct pim_instance *pim, pim_addr group)
        return NULL;
 }
 
-#else
-CPP_NOTICE("functions stubbed out for IPv6");
-
-struct pim_rpf *pim_rp_g(struct pim_instance *pim, pim_addr group)
-{
-       return NULL;
-}
-#endif
-
 /*
  * Set the upstream IP address we want to talk to based upon
  * the rp configured and the source address