summaryrefslogtreecommitdiff
path: root/bgpd/bgp_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_main.c')
-rw-r--r--bgpd/bgp_main.c43
1 files changed, 8 insertions, 35 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index ebf2328a71..b082aa9c6a 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -61,16 +61,10 @@
#include "bgpd/bgp_network.h"
#include "bgpd/bgp_errors.h"
-DEFINE_HOOK(bgp_hook_config_write_vrf, (struct vty *vty, struct vrf *vrf),
- (vty, vrf))
-
#ifdef ENABLE_BGP_VNC
#include "bgpd/rfapi/rfapi_backend.h"
#endif
-DEFINE_HOOK(bgp_hook_vrf_update, (struct vrf *vrf, bool enabled),
- (vrf, enabled))
-
/* bgpd options, we use GNU getopt library. */
static const struct option longopts[] = {
{"bgp_port", required_argument, NULL, 'p'},
@@ -139,19 +133,20 @@ void sighup(void)
/*
* This is turned off for the moment. There is all
* sorts of config turned off by bgp_terminate
- * that is not setup properly again in bgp_rest.
+ * that is not setup properly again in bgp_reset.
* I see no easy way to do this nor do I see that
* this is a desirable way to reload config
* given the yang work.
*/
/* Terminate all thread. */
- bgp_terminate();
- bgp_reset();
- zlog_info("bgpd restarting!");
-
- /* Reload config file. */
- vty_read_config(NULL, bgpd_di.config_file, config_default);
+ /*
+ * bgp_terminate();
+ * bgp_reset();
+ * zlog_info("bgpd restarting!");
+ * Reload config file.
+ * vty_read_config(NULL, bgpd_di.config_file, config_default);
+ */
/* Try to return to normal operation. */
}
@@ -308,7 +303,6 @@ static int bgp_vrf_enable(struct vrf *vrf)
if (old_vrf_id != bgp->vrf_id)
bgp_redistribute_redo(bgp);
bgp_instance_up(bgp);
- hook_call(bgp_hook_vrf_update, vrf, true);
vpn_leak_zebra_vrf_label_update(bgp, AFI_IP);
vpn_leak_zebra_vrf_label_update(bgp, AFI_IP6);
vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, AFI_IP,
@@ -358,37 +352,16 @@ static int bgp_vrf_disable(struct vrf *vrf)
if (old_vrf_id != bgp->vrf_id)
bgp_unset_redist_vrf_bitmaps(bgp, old_vrf_id);
bgp_instance_down(bgp);
- hook_call(bgp_hook_vrf_update, vrf, false);
}
/* Note: This is a callback, the VRF will be deleted by the caller. */
return 0;
}
-static int bgp_vrf_config_write(struct vty *vty)
-{
- struct vrf *vrf;
-
- RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
- if (vrf->vrf_id == VRF_DEFAULT) {
- vty_out(vty, "!\n");
- continue;
- }
- vty_out(vty, "vrf %s\n", vrf->name);
-
- hook_call(bgp_hook_config_write_vrf, vty, vrf);
-
- vty_out(vty, " exit-vrf\n!\n");
- }
-
- return 0;
-}
-
static void bgp_vrf_init(void)
{
vrf_init(bgp_vrf_new, bgp_vrf_enable, bgp_vrf_disable,
bgp_vrf_delete, bgp_vrf_enable);
- vrf_cmd_init(bgp_vrf_config_write, &bgpd_privs);
}
static void bgp_vrf_terminate(void)