diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2025-02-12 12:50:42 +0100 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2025-02-12 20:12:06 +0000 |
| commit | be6659ad298ac73605b1121e99bdc6c6b126c6a3 (patch) | |
| tree | 0d41cf6254dbc94924db19fbda4d0e9e7469d9f0 /lib/id_alloc.c | |
| parent | 6ef513eb30ca1ca4d626921c588b4d5e3f42d1de (diff) | |
bgpd: fix incorrect json in bgp_show_table_rd
In bgp_show_table_rd(), the is_last argument is determined using the
expression "next == NULL" to check if the RD table is the last one. This
helps ensure proper JSON formatting.
However, if next is not NULL but is no longer associated with a BGP
table, the JSON output becomes malformed.
Updates the condition to also verify the existence of the next bgp_dest
table.
Fixes: 1ae44dfcba ("bgpd: unify 'show bgp' with RD with normal unicast bgp show")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit cf0269649cdd09b8d3f2dd8815caf6ecf9cdeef9)
Diffstat (limited to 'lib/id_alloc.c')
0 files changed, 0 insertions, 0 deletions
