summaryrefslogtreecommitdiff
path: root/lib/grammar_sandbox_main.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-05-13 15:18:57 -0300
committerRenato Westphal <renato@opensourcerouting.org>2019-05-13 15:18:57 -0300
commit8d0d863754578a5b5879d6267f07ddcec090ba00 (patch)
treec01010fd9df097e60a32095106e5622271342ea3 /lib/grammar_sandbox_main.c
parent4ac9d2cbe4ead57bf0a49c55fc9c2a10e20d9755 (diff)
lib: fix crash in the CLI grammar sandbox
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>
Diffstat (limited to 'lib/grammar_sandbox_main.c')
-rw-r--r--lib/grammar_sandbox_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/grammar_sandbox_main.c b/lib/grammar_sandbox_main.c
index c9c942f9bf..38494fb007 100644
--- a/lib/grammar_sandbox_main.c
+++ b/lib/grammar_sandbox_main.c
@@ -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);