summaryrefslogtreecommitdiffstats
path: root/src/vnet/rewrite.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/rewrite.c')
-rw-r--r--src/vnet/rewrite.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vnet/rewrite.c b/src/vnet/rewrite.c
index 53d548bc8ae..8925ad6174a 100644
--- a/src/vnet/rewrite.c
+++ b/src/vnet/rewrite.c
@@ -79,8 +79,11 @@ format_vnet_rewrite (u8 * s, va_list * args)
if (rw->sw_if_index != ~0)
{
vnet_sw_interface_t *si;
- si = vnet_get_sw_interface (vnm, rw->sw_if_index);
- s = format (s, "%U: ", format_vnet_sw_interface_name, vnm, si);
+ si = vnet_get_sw_interface_safe (vnm, rw->sw_if_index);
+ if (NULL != si)
+ s = format (s, "%U: ", format_vnet_sw_interface_name, vnm, si);
+ else
+ s = format (s, "DELETED");
}
else
s = format (s, "%v: ", next->name);