diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2023-06-07 15:15:30 +0200 |
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2023-06-16 14:18:25 +0200 |
| commit | a04d32b36649c0e14c76ec121d17a46d95db5697 (patch) | |
| tree | 7fe4522f195045139fbaed616ac2d5cd984b093d /python | |
| parent | af79038c4be1b5cec7da9f67b81280d6f14e2479 (diff) | |
bgpd: fix incorrect json output in bgp_show_table_rd()
'{}' extra output may present JSON output from bgp_show_table_rd() when
no prefix are seen.
> {
> "vrfId": 0,
> "vrfName": "default",
> "tableVersion": 0,
> "routerId": "1.1.1.1",
> "defaultLocPrf": 100,
> "localAS": 65500,
> "routes": { "routeDistinguishers" : { "444:1" : { } } } }
> {}
Do not output '{}' when bgp_show_table() returns a valid JSON.
Tested without rd in config, bgp_show_table() returns nothing and the
JSON output is only '{}'
Fixes: 0224b3296c ("bgpd: Print empty JSON `{}` if no entries under `show bgp ipv4 vpn json`")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'python')
0 files changed, 0 insertions, 0 deletions
