]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_vrf.c
Merge branch 'frr/pull/546' ("bgpd: resolve issue with sending vpn labels")
[mirror_frr.git] / zebra / zebra_vrf.c
index bc18ee5863650caee2eaa4f0a74522b3d55804d7..94e2506186fa0812d8befbe4090c84abe35b1580 100644 (file)
  * 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.
+ * 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>
 
@@ -265,6 +264,7 @@ zebra_vrf_delete (struct vrf *vrf)
            {
              route_unlock_node (rnode);
              list_delete_node (zebrad.mq->subq[i], lnode);
+             zebrad.mq->size--;
            }
        }
     }
@@ -535,11 +535,10 @@ vrf_config_write (struct vty *vty)
 void
 zebra_vrf_init (void)
 {
-  vrf_add_hook (VRF_NEW_HOOK, zebra_vrf_new);
-  vrf_add_hook (VRF_ENABLE_HOOK, zebra_vrf_enable);
-  vrf_add_hook (VRF_DISABLE_HOOK, zebra_vrf_disable);
-  vrf_add_hook (VRF_DELETE_HOOK, zebra_vrf_delete);
+  vrf_init (zebra_vrf_new,
+           zebra_vrf_enable,
+           zebra_vrf_disable,
+           zebra_vrf_delete);
 
-  vrf_init ();
   vrf_cmd_init (vrf_config_write);
 }