diff options
Diffstat (limited to 'bgpd/bgp_main.c')
| -rw-r--r-- | bgpd/bgp_main.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index ebf2328a71..33eaf9ae74 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'}, @@ -308,7 +302,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 +351,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) |
