]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Remove unnecessary boolean to pim_rpf_update 4488/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 2 May 2019 22:25:57 +0000 (18:25 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 7 Jun 2019 17:27:29 +0000 (13:27 -0400)
We already log whether or not we add nht tracking, having
an additional boolean to say to log another line is
a bit over the top.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_nht.c
pimd/pim_rp.c
pimd/pim_rpf.c
pimd/pim_rpf.h
pimd/pim_upstream.c
pimd/pim_vxlan.c

index 1a2f451524fda881d3153b3b1eeb4a8b88272f7b..65ea858cb60bdcd432656a29819c6bd4d1ac5207 100644 (file)
@@ -447,7 +447,7 @@ static int pim_update_upstream_nh_helper(struct hash_bucket *bucket, void *arg)
        struct pim_rpf old;
 
        old.source_nexthop.interface = up->rpf.source_nexthop.interface;
-       rpf_result = pim_rpf_update(pim, up, &old, 0);
+       rpf_result = pim_rpf_update(pim, up, &old);
        if (rpf_result == PIM_RPF_FAILURE) {
                pim_upstream_rpf_clear(pim, up);
                return HASHWALK_CONTINUE;
index ca865d28c31e1ec5ef786011b3ece75ecbc206d5..35c040c64cec06019145ee85bb658bf3f35eab93 100644 (file)
@@ -381,7 +381,7 @@ void pim_upstream_update(struct pim_instance *pim, struct pim_upstream *up)
 
        old_rpf.source_nexthop.interface = up->rpf.source_nexthop.interface;
 
-       rpf_result = pim_rpf_update(pim, up, &old_rpf, 1);
+       rpf_result = pim_rpf_update(pim, up, &old_rpf);
        if (rpf_result == PIM_RPF_FAILURE)
                pim_mroute_del(up->channel_oil, __PRETTY_FUNCTION__);
 
index d388802454730431e9681e6c22e03036c6300658..b1a2e717d6ab852c40e1de88bcc15f8c25ee9f9a 100644 (file)
@@ -195,8 +195,7 @@ static int nexthop_mismatch(const struct pim_nexthop *nh1,
 }
 
 enum pim_rpf_result pim_rpf_update(struct pim_instance *pim,
-                                  struct pim_upstream *up, struct pim_rpf *old,
-                                  uint8_t is_new)
+                                  struct pim_upstream *up, struct pim_rpf *old)
 {
        struct pim_rpf *rpf = &up->rpf;
        struct pim_rpf saved;
@@ -216,14 +215,6 @@ enum pim_rpf_result pim_rpf_update(struct pim_instance *pim,
        saved.source_nexthop = rpf->source_nexthop;
        saved.rpf_addr = rpf->rpf_addr;
 
-       if (is_new && PIM_DEBUG_ZEBRA) {
-               char source_str[INET_ADDRSTRLEN];
-               pim_inet4_dump("<source?>", up->upstream_addr, source_str,
-                              sizeof(source_str));
-               zlog_debug("%s: NHT Register upstream %s addr %s with Zebra.",
-                          __PRETTY_FUNCTION__, up->sg_str, source_str);
-       }
-       /* Register addr with Zebra NHT */
        nht_p.family = AF_INET;
        nht_p.prefixlen = IPV4_MAX_BITLEN;
        nht_p.u.prefix4.s_addr = up->upstream_addr.s_addr;
index 1172acb4b229c6196739d859f25591af2ae8e762..df7b249289eeb9539c4c9ccd70a2b0eb82a468b5 100644 (file)
@@ -62,8 +62,8 @@ bool pim_rpf_equal(const void *arg1, const void *arg2);
 bool pim_nexthop_lookup(struct pim_instance *pim, struct pim_nexthop *nexthop,
                        struct in_addr addr, int neighbor_needed);
 enum pim_rpf_result pim_rpf_update(struct pim_instance *pim,
-                                  struct pim_upstream *up, struct pim_rpf *old,
-                                  uint8_t is_new);
+                                  struct pim_upstream *up,
+                                  struct pim_rpf *old);
 void pim_upstream_rpf_clear(struct pim_instance *pim,
                            struct pim_upstream *up);
 int pim_rpf_addr_is_inaddr_none(struct pim_rpf *rpf);
index 44b8ecbfea4767c1a8912fe3b7c2fc274eded214..50c68c66bdc2cfdaa85b2727bed30d269e0633a9 100644 (file)
@@ -749,7 +749,7 @@ static struct pim_upstream *pim_upstream_new(struct pim_instance *pim,
                up->channel_oil = pim_channel_oil_add(pim, &up->sg, MAXVIFS);
 
        } else {
-               rpf_result = pim_rpf_update(pim, up, NULL, 1);
+               rpf_result = pim_rpf_update(pim, up, NULL);
                if (rpf_result == PIM_RPF_FAILURE) {
                        if (PIM_DEBUG_TRACE)
                                zlog_debug(
@@ -1625,7 +1625,7 @@ void pim_upstream_find_new_rpf(struct pim_instance *pim)
                                zlog_debug(
                                        "%s: Upstream %s without a path to send join, checking",
                                        __PRETTY_FUNCTION__, up->sg_str);
-                       pim_rpf_update(pim, up, NULL, 1);
+                       pim_rpf_update(pim, up, NULL);
                }
        }
 }
index 09669e206eafea4316d580792c68a56ece57e282..d2648fad50a1da69118d1e8e8b2b95327c263e13 100644 (file)
@@ -245,7 +245,7 @@ static void pim_vxlan_orig_mr_up_del(struct pim_vxlan_sg *vxlan_sg)
                 * for nht
                 */
                if (up)
-                       pim_rpf_update(vxlan_sg->pim, up, NULL, 1 /* is_new */);
+                       pim_rpf_update(vxlan_sg->pim, up, NULL);
        }
 }