[frr] [PATCH v2 08/10] bgpd: separate vty init from bgp vrf init

Philippe Guibert philippe.guibert at 6wind.com
Wed Dec 21 12:32:39 EST 2016


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 at 6wind.com>
---
 bgpd/bgp_vrf.c | 4 ++++
 bgpd/bgp_vrf.h | 1 +
 bgpd/bgp_vty.c | 3 +++
 3 files changed, 8 insertions(+)

diff --git a/bgpd/bgp_vrf.c b/bgpd/bgp_vrf.c
index 3923fe365892..221eeff7e1b7 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"
-- 
2.1.4





More information about the dev mailing list