]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Remove possibility of trying to send Register when no RPF 5877/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 26 Feb 2020 14:47:28 +0000 (09:47 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 6 Mar 2020 21:34:11 +0000 (16:34 -0500)
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 <sharpd@cumulusnetworks.com>
pimd/pim_vxlan.c

index cce6cfd793cd55d5f21bab909f0839165f2a43d8..367c5f90fe3177ad4ace09dbb31a4aafa6b8d9cf 100644 (file)
@@ -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) {