Skip to content

Commit

Permalink
pimd: In join suppression period, join is being sent
Browse files Browse the repository at this point in the history
RCA:
Either JP timer is used to send join or join timer.
We are not removing the group from jp aggregate during suppression.
So even if join timer is restarted, jp aggregate expiry during suppression
is sending join for the group.

Fix:
Remove the group from jp aggregate on the neighbor during jp suppression.

Signed-off-by: Saravanan K <[email protected]>
  • Loading branch information
sarav511 committed Mar 19, 2020
1 parent 7f2ccbe commit 810cbaf
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions pimd/pim_upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ void pim_upstream_join_suppress(struct pim_upstream *up,
struct in_addr rpf_addr, int holdtime)
{
long t_joinsuppress_msec;
long join_timer_remain_msec;
long join_timer_remain_msec = 0;
struct pim_neighbor *nbr = NULL;

if (!up->rpf.source_nexthop.interface) {
if (PIM_DEBUG_PIM_TRACE)
Expand All @@ -426,7 +427,18 @@ void pim_upstream_join_suppress(struct pim_upstream *up,
MIN(pim_if_t_suppressed_msec(up->rpf.source_nexthop.interface),
1000 * holdtime);

join_timer_remain_msec = pim_time_timer_remain_msec(up->t_join_timer);
if (up->t_join_timer)
join_timer_remain_msec =
pim_time_timer_remain_msec(up->t_join_timer);
else {
/* Remove it from jp agg from the nbr for suppression */
nbr = pim_neighbor_find(up->rpf.source_nexthop.interface,
up->rpf.rpf_addr.u.prefix4);
if (nbr) {
join_timer_remain_msec =
pim_time_timer_remain_msec(nbr->jp_timer);
}
}

if (PIM_DEBUG_PIM_TRACE) {
char rpf_str[INET_ADDRSTRLEN];
Expand All @@ -445,6 +457,9 @@ void pim_upstream_join_suppress(struct pim_upstream *up,
t_joinsuppress_msec);
}

if (nbr)
pim_jp_agg_remove_group(nbr->upstream_jp_agg, up, nbr);

pim_upstream_join_timer_restart_msec(up, t_joinsuppress_msec);
}
}
Expand Down

0 comments on commit 810cbaf

Please sign in to comment.