Skip to content

Commit

Permalink
bgpd: fix wrong display of default vrf name
Browse files Browse the repository at this point in the history
The following output displays a ((null)) vrf:

> rt2> show bgp ipv4 labeled-unicast prefix 172.16.1.1/32
> BGP routing table entry for 172.16.1.1/32, version 2
> Local label: 16
> Paths: (1 available, best #1, table default, vrf (null))
>   Advertised to non peer-group peers:
>   172.16.1.1
> [..]

Fix this by displaying the appropriate default vrf name when possible.

Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
pguibert6WIND committed Aug 30, 2024
1 parent 90787a5 commit 463938b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -12347,7 +12347,9 @@ void route_vty_out_detail_header(struct vty *vty, struct bgp *bgp,
VRF_DEFAULT_NAME);
else
vty_out(vty, ", vrf %s",
bgp->name);
(bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
? VRF_DEFAULT_NAME
: bgp->name);
}
} else
vty_out(vty, ", no best path");
Expand Down

0 comments on commit 463938b

Please sign in to comment.