summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/if.c b/lib/if.c
index 0cfd591160..a803754375 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -177,6 +177,8 @@ void if_update_to_new_vrf(struct interface *ifp, vrf_id_t vrf_id)
if (ifp->ifindex != IFINDEX_INTERNAL)
IFINDEX_RB_INSERT(vrf, ifp);
+ if (!old_vrf->name)
+ return;
/*
* HACK: Change the interface VRF in the running configuration directly,
* bypassing the northbound layer. This is necessary to avoid deleting