]> git.proxmox.com Git - mirror_frr.git/commit - lib/json.c
Quagga: Fixup cli and json keyword
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 18 Nov 2015 23:36:04 +0000 (15:36 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 18 Nov 2015 23:36:04 +0000 (15:36 -0800)
commitdb7c85284f7a1c472da0e905a0020ed02d37f539
treee64915779a5cc411fbcd2894bc328899391b6ce5
parenteb2674af89fbd4a81867528ffc0884191182bcb9
Quagga: Fixup cli and json keyword

The json keyword was being read incorrectly.
Basically some commands read a variable # of arguments
and in ospf the command values were being placed into
argc and argv.  With a variable # of arguments their
existed a possibility that less arguments would be read
from the cli than were being tested for in the command function
handler.  This caused core dumps in some situations.

All code to read to decide to use the json keyword has
been centralized through a function and all code
converted to use it, irrelevant if it exhibited the bug

Ticket: CM-8278
Reviewed by: CCR-3830
Testing: OSPF no longer crashes and all other test suites still run

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_mplsvpn.c
bgpd/bgp_route.c
bgpd/bgp_vty.c
lib/json.c
lib/json.h
ospfd/ospf_vty.c