From c40e9806011eb4475e6dd7c41234376f944cb904 Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Tue, 18 Aug 2020 11:24:22 -0400 Subject: [PATCH] lib: fix crash in show nexthop when vrf deleted Fix a crash where if we issue a show run after a vrf has been deleted we would crash here due to not null checking. Signed-off-by: Stephen Worley --- lib/nexthop_group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c index 97815ceeb9..8ae001e42a 100644 --- a/lib/nexthop_group.c +++ b/lib/nexthop_group.c @@ -986,7 +986,7 @@ void nexthop_group_write_nexthop(struct vty *vty, const struct nexthop *nh) if (nh->vrf_id != VRF_DEFAULT) { vrf = vrf_lookup_by_id(nh->vrf_id); - vty_out(vty, " nexthop-vrf %s", vrf->name); + vty_out(vty, " nexthop-vrf %s", VRF_LOGNAME(vrf)); } if (nh->nh_label && nh->nh_label->num_labels > 0) { -- 2.39.5