summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_vty.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-08-06 18:54:57 +0200
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-10-14 15:52:47 +0200
commit1d7260a1b5c9fc9408b96fea1db393e565ec585c (patch)
tree64c03f68def42e12723932e5759d31ec09959f27 /zebra/zebra_vty.c
parentMerge pull request #9817 from donaldsharp/link_type_ordering (diff)
downloadfrr-1d7260a1b5c9fc9408b96fea1db393e565ec585c.tar.xz
frr-1d7260a1b5c9fc9408b96fea1db393e565ec585c.zip
bgpd: Send BGP best path reason to Zebra
``` exit1-debian-9# show ip route 172.16.16.1/32 Routing entry for 172.16.16.1/32 Known via "bgp", distance 20, metric 0, best Last update 00:00:28 ago * 192.168.0.2, via eth1, weight 1 AS-Path : 65003 Communities : first 65001:2 65001:3 Large-Communities: 65001:1:1 65001:1:2 65001:1:3 Selection reason : First path received ``` Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r--zebra/zebra_vty.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 06528d3db..3d101011e 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -449,6 +449,8 @@ static void zebra_show_ip_route_opaque(struct vty *vty, struct route_entry *re,
bzo.community);
json_object_string_add(json, "largeCommunities",
bzo.lcommunity);
+ json_object_string_add(json, "selectionReason",
+ bzo.selection_reason);
} else {
vty_out(vty, " AS-Path : %s\n", bzo.aspath);
@@ -459,6 +461,9 @@ static void zebra_show_ip_route_opaque(struct vty *vty, struct route_entry *re,
if (bzo.lcommunity[0] != '\0')
vty_out(vty, " Large-Communities: %s\n",
bzo.lcommunity);
+
+ vty_out(vty, " Selection reason : %s\n",
+ bzo.selection_reason);
}
}
default: