From c48a612c21bce760d4943effde1b79e395a03607 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 10 Feb 2017 15:04:17 -0500 Subject: [PATCH] pimd: Remove unneeded parameter pim_upstream_join_timer_decrease_to_t_override passed in a `struct in_addr` that in all cases was part of the upstream data structure that was passed in already. Signed-off-by: Donald Sharp --- pimd/pim_ifchannel.c | 9 +++------ pimd/pim_upstream.c | 7 +++---- pimd/pim_upstream.h | 5 +++-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index f0e4a3a68a..3caac4cda6 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -665,20 +665,17 @@ static void check_recv_upstream(int is_join, if (source_flags & PIM_RPT_BIT_MASK) { if (source_flags & PIM_WILDCARD_BIT_MASK) { /* Prune(*,G) to RPF'(S,G) */ - pim_upstream_join_timer_decrease_to_t_override("Prune(*,G)", - up, up->rpf.rpf_addr.u.prefix4); + pim_upstream_join_timer_decrease_to_t_override("Prune(*,G)", up); return; } /* Prune(S,G,rpt) to RPF'(S,G) */ - pim_upstream_join_timer_decrease_to_t_override("Prune(S,G,rpt)", - up, up->rpf.rpf_addr.u.prefix4); + pim_upstream_join_timer_decrease_to_t_override("Prune(S,G,rpt)", up); return; } /* Prune(S,G) to RPF'(S,G) */ - pim_upstream_join_timer_decrease_to_t_override("Prune(S,G)", up, - up->rpf.rpf_addr.u.prefix4); + pim_upstream_join_timer_decrease_to_t_override("Prune(S,G)", up); } static int nonlocal_upstream(int is_join, diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 4ae49c0fd4..4f63b20da5 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -334,8 +334,7 @@ void pim_upstream_join_suppress(struct pim_upstream *up, } void pim_upstream_join_timer_decrease_to_t_override(const char *debug_label, - struct pim_upstream *up, - struct in_addr rpf_addr) + struct pim_upstream *up) { long join_timer_remain_msec; int t_override_msec; @@ -345,7 +344,7 @@ void pim_upstream_join_timer_decrease_to_t_override(const char *debug_label, if (PIM_DEBUG_TRACE) { char rpf_str[INET_ADDRSTRLEN]; - pim_inet4_dump("", rpf_addr, rpf_str, sizeof(rpf_str)); + pim_inet4_dump("", up->rpf.rpf_addr.u.prefix4, rpf_str, sizeof(rpf_str)); zlog_debug("%s: to RPF'%s=%s: join_timer=%ld msec t_override=%d msec", debug_label, up->sg_str, rpf_str, @@ -803,7 +802,7 @@ void pim_upstream_rpf_genid_changed(struct in_addr neigh_addr) continue; pim_upstream_join_timer_decrease_to_t_override("RPF'(S,G) GenID change", - up, neigh_addr); + up); } } diff --git a/pimd/pim_upstream.h b/pimd/pim_upstream.h index 1a50c0c6e3..271f2dfbde 100644 --- a/pimd/pim_upstream.h +++ b/pimd/pim_upstream.h @@ -134,9 +134,10 @@ void pim_upstream_update_join_desired(struct pim_upstream *up); void pim_upstream_join_suppress(struct pim_upstream *up, struct in_addr rpf_addr, int holdtime); + void pim_upstream_join_timer_decrease_to_t_override(const char *debug_label, - struct pim_upstream *up, - struct in_addr rpf_addr); + struct pim_upstream *up); + void pim_upstream_join_timer_restart(struct pim_upstream *up); void pim_upstream_rpf_genid_changed(struct in_addr neigh_addr); void pim_upstream_rpf_interface_changed(struct pim_upstream *up, -- 2.39.5