]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: fix crash in the CLI grammar sandbox
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 13 May 2019 18:18:57 +0000 (15:18 -0300)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 16 May 2019 20:35:34 +0000 (16:35 -0400)
The CLI grammer sandbox needs to initialize the northbound subsystem
otherwise the running_config global variable won't be set, which
leads to crashes.

Fixes #4319.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lib/grammar_sandbox_main.c

index c9c942f9bf897a02599dea196ce1dcea5463556a..38494fb0074e6186c0efb0acee294e801c71f819 100644 (file)
@@ -58,6 +58,8 @@ int main(int argc, char **argv)
 
        vty_init(master);
        memory_init();
+       yang_init();
+       nb_init(master, NULL, 0);
 
        vty_stdio(vty_do_exit);