aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/dpo/mpls_label_dpo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/dpo/mpls_label_dpo.c')
-rw-r--r--src/vnet/dpo/mpls_label_dpo.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vnet/dpo/mpls_label_dpo.c b/src/vnet/dpo/mpls_label_dpo.c
index b178a902e32..2a6e7dd5e48 100644
--- a/src/vnet/dpo/mpls_label_dpo.c
+++ b/src/vnet/dpo/mpls_label_dpo.c
@@ -105,10 +105,18 @@ format_mpls_label_dpo (u8 *s, va_list *args)
mpls_label_dpo_t *mld;
u32 ii;
- mld = mpls_label_dpo_get(index);
-
s = format(s, "mpls-label:[%d]:", index);
+ if (pool_is_free_index(mpls_label_dpo_pool, index))
+ {
+ /*
+ * the packet trace can be printed after the DPO has been deleted
+ */
+ return (s);
+ }
+
+ mld = mpls_label_dpo_get(index);
+
for (ii = 0; ii < mld->mld_n_labels; ii++)
{
hdr.label_exp_s_ttl =