From: Mobashshera Rasool Date: Thu, 7 Jan 2021 10:03:07 +0000 (+0000) Subject: pimd: SPT-bit is not set to false as per RFC section in one flow X-Git-Tag: base_7.6~59^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F7828%2Fhead;p=mirror%2Ffrr.git pimd: SPT-bit is not set to false as per RFC section in one flow 1. As per RFC 4601 Sec 4.5.7: * JoinDesired(S,G) -> False, set SPTbit to false. 2. Change the debug type. Signed-off-by: Mobashshera Rasool --- diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 0bccba397b..23259900b7 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -628,7 +628,7 @@ static int pim_mroute_msg(struct pim_instance *pim, const char *buf, ifaddr = connected_src->u.prefix4; igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->igmp_socket_list, ifaddr); - if (PIM_DEBUG_MROUTE) { + if (PIM_DEBUG_IGMP_PACKETS) { zlog_debug( "%s(%s): igmp kernel upcall on %s(%p) for %pI4 -> %pI4", __func__, pim->vrf->name, ifp->name, igmp, diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index d95b092d94..9899172e6c 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -749,6 +749,13 @@ void pim_upstream_switch(struct pim_instance *pim, struct pim_upstream *up, bool send_xg_jp = false; forward_off(up); + /* + * RFC 4601 Sec 4.5.7: + * JoinDesired(S,G) -> False, set SPTbit to false. + */ + if (up->sg.src.s_addr != INADDR_ANY) + up->sptbit = PIM_UPSTREAM_SPTBIT_FALSE; + if (old_state == PIM_UPSTREAM_JOINED) pim_msdp_up_join_state_changed(pim, up);