summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pimd/pim_neighbor.c19
-rw-r--r--pimd/pim_pim.c2
2 files changed, 4 insertions, 17 deletions
diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c
index 83d3851d9e..d253ef5412 100644
--- a/pimd/pim_neighbor.c
+++ b/pimd/pim_neighbor.c
@@ -240,26 +240,11 @@ static int on_neighbor_timer(struct thread *t)
return 0;
}
-static void neighbor_timer_off(struct pim_neighbor *neigh)
-{
- if (PIM_DEBUG_PIM_TRACE_DETAIL) {
- if (neigh->t_expire_timer) {
- char src_str[INET_ADDRSTRLEN];
- pim_inet4_dump("<src?>", neigh->source_addr, src_str, sizeof(src_str));
- zlog_debug("%s: cancelling timer for neighbor %s on %s",
- __PRETTY_FUNCTION__,
- src_str, neigh->interface->name);
- }
- }
- THREAD_OFF(neigh->t_expire_timer);
- zassert(!neigh->t_expire_timer);
-}
-
void pim_neighbor_timer_reset(struct pim_neighbor *neigh, uint16_t holdtime)
{
neigh->holdtime = holdtime;
- neighbor_timer_off(neigh);
+ THREAD_OFF(neigh->t_expire_timer);
/*
0xFFFF is request for no holdtime
@@ -571,7 +556,7 @@ void pim_neighbor_delete(struct interface *ifp,
zlog_info("PIM NEIGHBOR DOWN: neighbor %s on interface %s: %s",
src_str, ifp->name, delete_message);
- neighbor_timer_off(neigh);
+ THREAD_OFF(neigh->t_expire_timer);
pim_if_assert_on_neighbor_down(ifp, neigh->source_addr);
diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c
index b973adacc4..f9d74ff039 100644
--- a/pimd/pim_pim.c
+++ b/pimd/pim_pim.c
@@ -245,6 +245,7 @@ int pim_pim_packet(struct interface *ifp, uint8_t *buf, size_t len)
pim_type, src_str, ifp->name);
return -1;
}
+ pim_neighbor_timer_reset(neigh, neigh->holdtime);
return pim_joinprune_recv(ifp, neigh,
ip_hdr->ip_src,
pim_msg + PIM_MSG_HEADER_LEN,
@@ -259,6 +260,7 @@ int pim_pim_packet(struct interface *ifp, uint8_t *buf, size_t len)
pim_type, src_str, ifp->name);
return -1;
}
+ pim_neighbor_timer_reset(neigh, neigh->holdtime);
return pim_assert_recv(ifp, neigh,
ip_hdr->ip_src,
pim_msg + PIM_MSG_HEADER_LEN,