From: Donald Sharp Date: Wed, 26 Feb 2020 14:47:28 +0000 (-0500) Subject: pimd: Remove possibility of trying to send Register when no RPF X-Git-Tag: base_7.4~265^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7a11dc746f5bf7256069f6e2b7aa9048f02b4830;p=mirror%2Ffrr.git pimd: Remove possibility of trying to send Register when no RPF On shutdown processing we may have gotten a interface down event which might clear the rpf interface and we might trigger a work queue item on the vxlan_sg to send a NULL register. Ensure that we cannot attempt to do the impossible. Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_vxlan.c b/pimd/pim_vxlan.c index cce6cfd793..367c5f90fe 100644 --- a/pimd/pim_vxlan.c +++ b/pimd/pim_vxlan.c @@ -85,8 +85,16 @@ static void pim_vxlan_do_reg_work(void) if (PIM_DEBUG_VXLAN) zlog_debug("vxlan SG %s periodic NULL register", vxlan_sg->sg_str); - pim_null_register_send(vxlan_sg->up); - ++work_cnt; + + /* + * If we are on the work queue *and* the rpf + * has been lost on the vxlan_sg->up let's + * make sure that we don't send it. + */ + if (vxlan_sg->up->rpf.source_nexthop.interface) { + pim_null_register_send(vxlan_sg->up); + ++work_cnt; + } } if (work_cnt > vxlan_info.max_work_cnt) {