diff options
| author | Sindhu Parvathi Gopinathan <sgopinathan@nvidia.com> | 2023-04-28 05:28:58 -0700 | 
|---|---|---|
| committer | Chirag Shah <chirag@nvidia.com> | 2023-04-28 16:04:25 -0700 | 
| commit | 2223b4d5434a232fa1280a51914c47db6f5f9f30 (patch) | |
| tree | 13d11ff657726fa41ad8d827db8aaf73f22aee71 /zebra/zebra_evpn_mh.c | |
| parent | 0c13c0bab81128dc1d43d79ccf780bdd4d00c5bf (diff) | |
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/zebra_evpn_mh.c')
| -rw-r--r-- | zebra/zebra_evpn_mh.c | 3 | 
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c index bf488ca316..49120c2877 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)  | 
