This commit fixes VRF vty configuration, RIB table creation,where initialisation of vty and bgp vrf was done at once. Side effect of this was that the make check procedure could not be performed at all. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> --- bgpd/bgp_vrf.c | 4 ++++ bgpd/bgp_vrf.h | 1 + bgpd/bgp_vty.c | 3 +++ tests/bgp_mp_attr_test.c | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_vrf.c b/bgpd/bgp_vrf.c index 53713da3dcb7..a6354de700e1 100644 --- a/bgpd/bgp_vrf.c +++ b/bgpd/bgp_vrf.c @@ -660,6 +660,10 @@ bgp_bgpvrf_init (struct bgp *bgp) bgp->vrfs->del = bgp_vrf_delete_int; bgp->rt_subscribers = hash_create(bgp_rt_hash_key, bgp_rt_hash_cmp); +} + +void bgp_bgpvrf_vty (void) +{ install_node (&bgp_vrf_node, NULL); install_default (BGP_VRF_NODE); diff --git a/bgpd/bgp_vrf.h b/bgpd/bgp_vrf.h index f8dd4489b0e0..81d491331d36 100644 --- a/bgpd/bgp_vrf.h +++ b/bgpd/bgp_vrf.h @@ -64,6 +64,7 @@ struct bgp_vrf }; DECLARE_QOBJ_TYPE(bgp_vrf) +extern void bgp_bgpvrf_vty (void); extern void bgp_bgpvrf_init (struct bgp *bgp); extern void bgp_bgpvrf_delete (struct bgp *bgp); extern void bgp_config_write_bgpvrf (struct vty *vty, struct bgp *bgp); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index c67e2993b764..fd81f860876c 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -10695,6 +10695,9 @@ bgp_vty_init (void) /* Community-list. */ community_list_vty (); + + /* bgp vrf */ + bgp_bgpvrf_vty (); } #include "memory.h" diff --git a/tests/bgp_mp_attr_test.c b/tests/bgp_mp_attr_test.c index dfb8ed9f7ab9..d8014edad300 100644 --- a/tests/bgp_mp_attr_test.c +++ b/tests/bgp_mp_attr_test.c @@ -743,7 +743,6 @@ main (void) { struct peer *peer; int i, j; - conf_bgp_debug_neighbor_events = -1UL; conf_bgp_debug_packet = -1UL; conf_bgp_debug_as4 = -1UL; @@ -757,6 +756,7 @@ main (void) vrf_init (); bgp_option_set (BGP_OPT_NO_LISTEN); bgp_attr_init (); + printf("CCCC"); if (fileno (stdout) >= 0) tty = isatty (fileno (stdout)); -- 2.1.4