From 4d97eea6302adabcd7b2235f722d9b6e3899dfc3 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Mon, 17 Dec 2018 17:44:02 +0100 Subject: [PATCH 1/3] bgpd: nexthop vrf name set to default vrf if default vrf is not Default, then nexthop vrf name returned may be "Default", which is not the correct name of default vrf. change it accordingly. Signed-off-by: Philippe Guibert --- bgpd/bgp_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 47c04c496..97aa189ba 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -6581,7 +6581,7 @@ void route_vty_out(struct vty *vty, struct prefix *p, CHECK_FLAG(path->flags, BGP_PATH_ANNC_NH_SELF) ? true : false; bool nexthop_othervrf = false; vrf_id_t nexthop_vrfid = VRF_DEFAULT; - const char *nexthop_vrfname = "Default"; + const char *nexthop_vrfname = VRF_DEFAULT_NAME; if (json_paths) json_path = json_object_new_object(); From 03a6facfd3a48edc2e34c92bf6c970afd7bcc3c4 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Mon, 17 Dec 2018 18:56:22 +0100 Subject: [PATCH 2/3] bgpd: bgp default vrf in show route naming change Default vrf name has been changed in show route. Because the default vrf name can be configured in zebra, the default vrf name in bgp is changed. Signed-off-by: Philippe Guibert --- bgpd/bgp_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 97aa189ba..d5a98e72f 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7863,7 +7863,7 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct prefix *p, if (path->extra->bgp_orig->inst_type == BGP_INSTANCE_TYPE_DEFAULT) - vn = "Default"; + vn = VRF_DEFAULT_NAME; else vn = path->extra->bgp_orig->name; From 08ab35fe0e5a964a0826b73cf3ade09b297b6f48 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Mon, 17 Dec 2018 18:56:36 +0100 Subject: [PATCH 3/3] zebra: the default vrf name in vxlan is correctly set the default vrf name was hardset to "Default", whereas the default vrf name could have been configured in an other manner. Fix this inconsistency. Signed-off-by: Philippe Guibert --- zebra/zebra_vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index abc1f85c0..20dc64b0b 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -8395,7 +8395,7 @@ int zebra_vxlan_if_add(struct interface *ifp) "Add L2-VNI %u VRF %s intf %s(%u) VLAN %u local IP %s master %u", vni, vlan_if ? vrf_id_to_name(vlan_if->vrf_id) - : "Default", + : VRF_DEFAULT_NAME, ifp->name, ifp->ifindex, vxl->access_vlan, inet_ntoa(vxl->vtep_ip), zif->brslave_info.bridge_ifindex);