]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_interface.c
zebra: Allow ns delete to happen after under/over flow checks
[mirror_frr.git] / ospfd / ospf_interface.c
index ddb25a20f61f3dc669021811977406a5f64c79be..f1477ba14dc531ad32d3f9fba56515302c85aebe 100644 (file)
@@ -920,6 +920,23 @@ static void ospf_vl_if_delete(struct ospf_vl_data *vl_data)
        vlink_count--;
 }
 
+/* for a defined area, count the number of configured vl
+ */
+int ospf_vl_count(struct ospf *ospf, struct ospf_area *area)
+{
+       int count = 0;
+       struct ospf_vl_data *vl_data;
+       struct listnode *node;
+
+       for (ALL_LIST_ELEMENTS_RO(ospf->vlinks, node, vl_data)) {
+               if (area
+                   && !IPV4_ADDR_SAME(&vl_data->vl_area_id, &area->area_id))
+                       continue;
+               count++;
+       }
+       return count;
+}
+
 /* Look up vl_data for given peer, optionally qualified to be in the
  * specified area. NULL area returns first found..
  */