]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_jp_agg.c
zebra: Allow ns delete to happen after under/over flow checks
[mirror_frr.git] / pimd / pim_jp_agg.c
index a00bed064f8cdcf1143d36208227d3415db8a9fe..7726ffda576da4c1e982ffec1c0fe035f82fe2cd 100644 (file)
@@ -32,7 +32,7 @@
 
 void pim_jp_agg_group_list_free(struct pim_jp_agg_group *jag)
 {
-       list_delete(jag->sources);
+       list_delete(&jag->sources);
 
        XFREE(MTYPE_PIM_JP_AGG_GROUP, jag);
 }
@@ -108,7 +108,7 @@ void pim_jp_agg_clear_group(struct list *group)
                        js->up = NULL;
                        XFREE(MTYPE_PIM_JP_AGG_SOURCE, js);
                }
-               jag->sources = NULL;
+               list_delete(&jag->sources);
                listnode_delete(group, jag);
                XFREE(MTYPE_PIM_JP_AGG_GROUP, jag);
        }
@@ -168,8 +168,7 @@ void pim_jp_agg_remove_group(struct list *group, struct pim_upstream *up)
        }
 
        if (jag->sources->count == 0) {
-               list_delete(jag->sources);
-               jag->sources = NULL;
+               list_delete(&jag->sources);
                listnode_delete(group, jag);
                XFREE(MTYPE_PIM_JP_AGG_GROUP, jag);
        }
@@ -213,12 +212,11 @@ int pim_jp_agg_is_in_list(struct list *group, struct pim_upstream *up)
 void pim_jp_agg_upstream_verification(struct pim_upstream *up, bool ignore)
 {
 #ifdef PIM_JP_AGG_DEBUG
-       struct listnode *node;
        struct interface *ifp;
        struct pim_interface *pim_ifp = up->rpf.source_nexthop.interface->info;
        struct pim_instance *pim = pim_ifp->pim;
 
-       for (ALL_LIST_ELEMENTS_RO(vrf_iflist(pim->vrf_id), node, ifp)) {
+       FOR_ALL_INTERFACES (pim->vrf, ifp) {
                pim_ifp = ifp->info;
                struct listnode *nnode;
 
@@ -331,7 +329,6 @@ void pim_jp_agg_single_upstream_send(struct pim_rpf *rpf,
 
        if (first) {
                groups = list_new();
-
                jag.sources = list_new();
 
                listnode_add(groups, &jag);