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>
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) {