summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/cdp/cdp_periodic.c3
-rw-r--r--src/vnet/lldp/lldp_output.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/cdp/cdp_periodic.c b/src/vnet/cdp/cdp_periodic.c
index de111079aa3..8899c49ce9c 100644
--- a/src/vnet/cdp/cdp_periodic.c
+++ b/src/vnet/cdp/cdp_periodic.c
@@ -125,6 +125,9 @@ send_ethernet_hello (cdp_main_t * cm, cdp_neighbor_t * n, int count)
h0 = vlib_packet_template_get_packet
(vm, &cm->packet_templates[n->packet_template_index], &bi0);
+ if (!h0)
+ break;
+
/* Add the interface's ethernet source address */
hw = vnet_get_sup_hw_interface (vnm, n->sw_if_index);
diff --git a/src/vnet/lldp/lldp_output.c b/src/vnet/lldp/lldp_output.c
index 950b79aebc6..8698ec976ac 100644
--- a/src/vnet/lldp/lldp_output.c
+++ b/src/vnet/lldp/lldp_output.c
@@ -145,6 +145,9 @@ lldp_send_ethernet (lldp_main_t * lm, lldp_intf_t * n, int shutdown)
*/
h0 = vlib_packet_template_get_packet (vm, &lm->packet_template, &bi0);
+ if (!h0)
+ return;
+
/* Add the interface's ethernet source address */
hw = vnet_get_hw_interface (vnm, n->hw_if_index);