From: Donald Sharp Date: Thu, 14 Jul 2016 21:16:42 +0000 (-0400) Subject: pimd: Add decision point to send register message X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~382 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=2ddab288813b4bf66fff05505143b8f9f7982fbc;p=matthieu%2Ffrr.git pimd: Add decision point to send register message When we receive a register stop we will have created a timer for this. As such if the t_rs_timer pointer will be non-NULL at this point. Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 41672b1b19..bf996a738b 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -194,7 +194,12 @@ pim_mroute_msg_wholepkt (int fd, struct interface *ifp, const char *buf, return 0; } - pim_register_send((const struct ip *)(buf + sizeof(struct ip)), rpg); + /* + * If we've received a register suppress + */ + if (!up->t_rs_timer) + pim_register_send((const struct ip *)(buf + sizeof(struct ip)), rpg); + return 0; } diff --git a/pimd/pim_upstream.h b/pimd/pim_upstream.h index ea44707c54..71a4c85f18 100644 --- a/pimd/pim_upstream.h +++ b/pimd/pim_upstream.h @@ -100,6 +100,13 @@ struct pim_upstream { struct thread *t_join_timer; + /* + * RST(S,G) + */ + struct thread *t_rs_timer; +#define PIM_REGISTER_SUPPRESSION_PERIOD (60) +#define PIM_REGISTER_PROBE_PERIOD (5) + /* * KAT(S,G) */