VPP-1507: Added binary api to dump configured ip_punt_redirect
[vpp.git] / src / vnet / dpo / receive_dpo.c
index 2b2571c..30ddcee 100644 (file)
@@ -31,7 +31,7 @@ receive_dpo_alloc (void)
     receive_dpo_t *rd;
 
     pool_get_aligned(receive_dpo_pool, rd, CLIB_CACHE_LINE_BYTES);
-    memset(rd, 0, sizeof(*rd));
+    clib_memset(rd, 0, sizeof(*rd));
 
     return (rd);
 }
@@ -102,6 +102,11 @@ format_receive_dpo (u8 *s, va_list *ap)
     vnet_main_t * vnm = vnet_get_main();
     receive_dpo_t *rd;
 
+    if (pool_is_free_index(receive_dpo_pool, index))
+    {
+        return (format(s, "dpo-receive DELETED"));
+    }
+
     rd = receive_dpo_get(index);
 
     if (~0 != rd->rd_sw_if_index)