diff options
Diffstat (limited to 'bgpd/bgp_main.c')
| -rw-r--r-- | bgpd/bgp_main.c | 53 |
1 files changed, 24 insertions, 29 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 1773070fe3..8714820e2a 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -1,22 +1,22 @@ /* Main routine of bgpd. - Copyright (C) 1996, 97, 98, 1999 Kunihiro Ishiguro - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + * Copyright (C) 1996, 97, 98, 1999 Kunihiro Ishiguro + * + * This file is part of GNU Zebra. + * + * GNU Zebra is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * GNU Zebra is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; see the file COPYING; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #include <zebra.h> @@ -237,6 +237,8 @@ bgp_exit (int status) stream_free (bgp_nexthop_buf); if (bgp_ifindices_buf) stream_free (bgp_ifindices_buf); + if (bgp_label_buf) + stream_free (bgp_label_buf); /* reverse bgp_master_init */ if (bm->master) @@ -325,22 +327,15 @@ bgp_vrf_disable (struct vrf *vrf) static void bgp_vrf_init (void) { - vrf_add_hook (VRF_NEW_HOOK, bgp_vrf_new); - vrf_add_hook (VRF_ENABLE_HOOK, bgp_vrf_enable); - vrf_add_hook (VRF_DISABLE_HOOK, bgp_vrf_disable); - vrf_add_hook (VRF_DELETE_HOOK, bgp_vrf_delete); - - vrf_init (); + vrf_init (bgp_vrf_new, + bgp_vrf_enable, + bgp_vrf_disable, + bgp_vrf_delete); } static void bgp_vrf_terminate (void) { - vrf_add_hook (VRF_NEW_HOOK, NULL); - vrf_add_hook (VRF_ENABLE_HOOK, NULL); - vrf_add_hook (VRF_DISABLE_HOOK, NULL); - vrf_add_hook (VRF_DELETE_HOOK, NULL); - vrf_terminate (); } |
