Skip to content

Commit 14e2deb

Browse files
authored
Merge pull request #20274 from FRRouting/mergify/bp/stable/10.3/pr-20268
bgpd: correction in json output structure for no data case (backport #20268)
2 parents 37e6eec + c5625de commit 14e2deb

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

bgpd/bgp_evpn_vty.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3324,13 +3324,9 @@ static void evpn_show_vni(struct vty *vty, struct bgp *bgp, vni_t vni,
33243324
}
33253325
}
33263326

3327-
if (!found) {
3328-
if (json) {
3329-
vty_out(vty, "{}\n");
3330-
} else {
3331-
vty_out(vty, "VNI not found\n");
3332-
return;
3333-
}
3327+
if (!found && !json) {
3328+
vty_out(vty, "VNI not found\n");
3329+
return;
33343330
}
33353331
}
33363332

0 commit comments

Comments
 (0)