mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-29 02:37:00 +00:00
pimd: Remove unnecessary boolean to pim_rpf_update
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>
This commit is contained in:
parent
3f759ec92f
commit
ae14da4860
@ -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;
|
||||
|
@ -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__);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user