]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: fix incorrect json in bgp_show_table_rd
authorLouis Scalbert <louis.scalbert@6wind.com>
Wed, 12 Feb 2025 11:50:42 +0000 (12:50 +0100)
committerLouis Scalbert <louis.scalbert@6wind.com>
Wed, 12 Feb 2025 12:34:21 +0000 (13:34 +0100)
commitcf0269649cdd09b8d3f2dd8815caf6ecf9cdeef9
treec6f5ca7ca3befa48f034eee5ca4549fc4e321c5d
parentd275f551c330c9a8d808081547cfe1ce410f3db0
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>
bgpd/bgp_route.c