]> git.puffer.fish Git - matthieu/frr.git/commit
vtysh: Fix Quagga.conf file read in.
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 28 Sep 2015 20:17:36 +0000 (13:17 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 28 Sep 2015 20:17:36 +0000 (13:17 -0700)
commitbed578b8b98978d12a6319300bb6eb3a8b4d1b63
treee9a58202b35cba83ec812adb14906650ef9e6257
parent1844fdbd7f3ad9e2a56652331f3833a7c44e69c4
vtysh: Fix Quagga.conf file read in.

There exists a sequence of cli commands that are successfully read in by bgpd.conf, but
not by a consolidated Quagga.conf.

This issue stems from the fact that the consolidated config file attempts to match the
current node + 1 node up the tree, while the individual config file searches for matches
all the way up the tree.

Quagga.conf read-in relies on vtysh_cmd.c command parsing which puts all nodes
at CONFIG_NODE and if a match is found CMD_SUCCESS_DAEMON is returned.  This signals to
the parser to call the appropriate daemon with the comamnd.

bgp as an example has three levels of config node's.  If you are reading in a config node
at the 3rd level(say address-family ipv6) then transition to another node under bgp it will
not work in Quagga.conf because the code only looked up one node and was at CONFIG_BGP when it failed
to find a match.

Ticket: CM-7625
Reviewed by: CCR-3591
Testing: See Bug

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
lib/command.c
lib/command.h
vtysh/vtysh.c