From 64fb3f86661c0f5ac2f9017a7b6b999dbcb8e2e4 Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Tue, 18 Aug 2020 11:55:51 -0700 Subject: [PATCH] tests/bgpd: initialized candidate_config to vtysh In test_peer_attr.c test is initializd with vty handler but candiate_config is not set. northbound converted bgp cli expects to derefence the candidate_config field which leads to crash. (gdb) p *test->vty->candidate_config $9 = {dnode = 0x0, version = 0} Signed-off-by: Chirag Shah --- tests/bgpd/test_peer_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bgpd/test_peer_attr.c b/tests/bgpd/test_peer_attr.c index 0979622eb3..52a83fe13c 100644 --- a/tests/bgpd/test_peer_attr.c +++ b/tests/bgpd/test_peer_attr.c @@ -932,7 +932,7 @@ static struct test *test_new(const char *desc, bool use_ibgp, test->vty = vty_new(); test->vty->type = VTY_TERM; - test->vty->node = CONFIG_NODE; + vty_config_enter(test->vty, true, false); test_initialize(test); -- 2.39.5