summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorSindhu Parvathi Gopinathan <sgopinathan@nvidia.com>2023-04-28 14:28:58 +0200
committerChirag Shah <chirag@nvidia.com>2023-04-29 01:04:25 +0200
commit2223b4d5434a232fa1280a51914c47db6f5f9f30 (patch)
tree13d11ff657726fa41ad8d827db8aaf73f22aee71 /zebra
parentMerge pull request #13407 from cscarpitta/fix/fix-srv6l3vpn-topotest (diff)
downloadfrr-2223b4d5434a232fa1280a51914c47db6f5f9f30.tar.xz
frr-2223b4d5434a232fa1280a51914c47db6f5f9f30.zip
zebra:add df flag into evpn esi json output
FRR "show evpn es 'esi-id' json" output dont have the 'df' flag. Modified the code to add the 'df' flag into json output. Before Fix: ``` torm-11# show evpn es 03:44:38:39:ff:ff:01:00:00:01 json { "esi":"03:44:38:39:ff:ff:01:00:00:01", "accessPort":"hostbond1", "flags":[ "local", "remote", "readyForBgp", "bridgePort", "operUp", "nexthopGroupActive" ====================> df is missing ], "vniCount":10, "macCount":13, "dfPreference":50000, "nexthopGroup":536870913, "vteps":[ { "vtep":"27.0.0.16", "dfAlgorithm":"preference", "dfPreference":32767, "nexthopId":268435460 }, { "vtep":"27.0.0.17", "dfAlgorithm":"preference", "dfPreference":32767, "nexthopId":268435461 } ] } torm-11# ``` After Fix:- ``` torm-11# show evpn es 03:44:38:39:ff:ff:01:00:00:01 json { "esi":"03:44:38:39:ff:ff:01:00:00:01", "accessPort":"hostbond1", "flags":[ "local", "remote", "readyForBgp", "bridgePort", "operUp", "nexthopGroupActive", "df" ========================> designated-forward flag added ], "vniCount":10, "macCount":13, "dfPreference":50000, "nexthopGroup":536870913, "vteps":[ { "vtep":"27.0.0.16", "dfAlgorithm":"preference", "dfPreference":32767, "nexthopId":268435460 }, { "vtep":"27.0.0.17", "dfAlgorithm":"preference", "dfPreference":32767, "nexthopId":268435461 } ] } torm-11# ``` Ticket:# 3447935 Issue: 3447935 Testing: UT done Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com> Signed-off-by: Chirag Shah <chirag@nvidia.com>
Diffstat (limited to 'zebra')
-rw-r--r--zebra/zebra_evpn_mh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c
index bf488ca31..49120c287 100644
--- a/zebra/zebra_evpn_mh.c
+++ b/zebra/zebra_evpn_mh.c
@@ -3157,6 +3157,9 @@ static void zebra_evpn_es_show_entry_detail(struct vty *vty,
json_array_string_add(json_flags, "local");
if (es->flags & ZEBRA_EVPNES_REMOTE)
json_array_string_add(json_flags, "remote");
+ if (es->flags & ZEBRA_EVPNES_LOCAL &&
+ !(es->flags & ZEBRA_EVPNES_NON_DF))
+ json_array_string_add(json_flags, "df");
if (es->flags & ZEBRA_EVPNES_NON_DF)
json_array_string_add(json_flags, "nonDF");
if (es->flags & ZEBRA_EVPNES_BYPASS)