forked from Mirror/frr
Merge pull request #3120 from opensourcerouting/remove-list-delete
lib: remove deprecated list_delete()/list_free()
This commit is contained in:
commit
e47e908c0d
|
@ -210,7 +210,7 @@ static void vrf_import_rt_free(struct vrf_irt_node *irt)
|
||||||
}
|
}
|
||||||
|
|
||||||
hash_release(bgp_def->vrf_import_rt_hash, irt);
|
hash_release(bgp_def->vrf_import_rt_hash, irt);
|
||||||
list_delete_and_null(&irt->vrfs);
|
list_delete(&irt->vrfs);
|
||||||
XFREE(MTYPE_BGP_EVPN_VRF_IMPORT_RT, irt);
|
XFREE(MTYPE_BGP_EVPN_VRF_IMPORT_RT, irt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ static struct irt_node *import_rt_new(struct bgp *bgp,
|
||||||
static void import_rt_free(struct bgp *bgp, struct irt_node *irt)
|
static void import_rt_free(struct bgp *bgp, struct irt_node *irt)
|
||||||
{
|
{
|
||||||
hash_release(bgp->import_rt_hash, irt);
|
hash_release(bgp->import_rt_hash, irt);
|
||||||
list_delete_and_null(&irt->vnis);
|
list_delete(&irt->vnis);
|
||||||
XFREE(MTYPE_BGP_EVPN_IMPORT_RT, irt);
|
XFREE(MTYPE_BGP_EVPN_IMPORT_RT, irt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4988,8 +4988,8 @@ void bgp_evpn_free(struct bgp *bgp, struct bgpevpn *vpn)
|
||||||
bgpevpn_unlink_from_l3vni(vpn);
|
bgpevpn_unlink_from_l3vni(vpn);
|
||||||
bgp_table_unlock(vpn->route_table);
|
bgp_table_unlock(vpn->route_table);
|
||||||
bgp_evpn_unmap_vni_from_its_rts(bgp, vpn);
|
bgp_evpn_unmap_vni_from_its_rts(bgp, vpn);
|
||||||
list_delete_and_null(&vpn->import_rtl);
|
list_delete(&vpn->import_rtl);
|
||||||
list_delete_and_null(&vpn->export_rtl);
|
list_delete(&vpn->export_rtl);
|
||||||
bf_release_index(bm->rd_idspace, vpn->rd_id);
|
bf_release_index(bm->rd_idspace, vpn->rd_id);
|
||||||
hash_release(bgp->vnihash, vpn);
|
hash_release(bgp->vnihash, vpn);
|
||||||
QOBJ_UNREG(vpn);
|
QOBJ_UNREG(vpn);
|
||||||
|
@ -5062,7 +5062,7 @@ struct evpnes *bgp_evpn_es_new(struct bgp *bgp,
|
||||||
*/
|
*/
|
||||||
void bgp_evpn_es_free(struct bgp *bgp, struct evpnes *es)
|
void bgp_evpn_es_free(struct bgp *bgp, struct evpnes *es)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&es->vtep_list);
|
list_delete(&es->vtep_list);
|
||||||
bgp_table_unlock(es->route_table);
|
bgp_table_unlock(es->route_table);
|
||||||
bf_release_index(bm->rd_idspace, es->rd_id);
|
bf_release_index(bm->rd_idspace, es->rd_id);
|
||||||
hash_release(bgp->esihash, es);
|
hash_release(bgp->esihash, es);
|
||||||
|
@ -5631,9 +5631,9 @@ void bgp_evpn_cleanup(struct bgp *bgp)
|
||||||
hash_free(bgp->esihash);
|
hash_free(bgp->esihash);
|
||||||
bgp->esihash = NULL;
|
bgp->esihash = NULL;
|
||||||
|
|
||||||
list_delete_and_null(&bgp->vrf_import_rtl);
|
list_delete(&bgp->vrf_import_rtl);
|
||||||
list_delete_and_null(&bgp->vrf_export_rtl);
|
list_delete(&bgp->vrf_export_rtl);
|
||||||
list_delete_and_null(&bgp->l2vnis);
|
list_delete(&bgp->l2vnis);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -4862,7 +4862,7 @@ void bgp_config_write_evpn_info(struct vty *vty, struct bgp *bgp, afi_t afi,
|
||||||
for (ALL_LIST_ELEMENTS_RO(vnilist, ln, data))
|
for (ALL_LIST_ELEMENTS_RO(vnilist, ln, data))
|
||||||
write_vni_config(vty, data);
|
write_vni_config(vty, data);
|
||||||
|
|
||||||
list_delete_and_null(&vnilist);
|
list_delete(&vnilist);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bgp->advertise_all_vni)
|
if (bgp->advertise_all_vni)
|
||||||
|
|
|
@ -357,7 +357,7 @@ void route_vty_out_flowspec(struct vty *vty, struct prefix *p,
|
||||||
if (list_began)
|
if (list_began)
|
||||||
vty_out(vty, ")");
|
vty_out(vty, ")");
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
list_delete_and_null(&list_bpm);
|
list_delete(&list_bpm);
|
||||||
} else
|
} else
|
||||||
vty_out(vty, "\tnot installed in PBR\n");
|
vty_out(vty, "\tnot installed in PBR\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -223,7 +223,7 @@ void bgp_lp_finish(void)
|
||||||
skiplist_free(lp->inuse);
|
skiplist_free(lp->inuse);
|
||||||
lp->inuse = NULL;
|
lp->inuse = NULL;
|
||||||
|
|
||||||
list_delete_and_null(&lp->chunks);
|
list_delete(&lp->chunks);
|
||||||
|
|
||||||
while ((lf = LABEL_FIFO_HEAD(lp->requests))) {
|
while ((lf = LABEL_FIFO_HEAD(lp->requests))) {
|
||||||
|
|
||||||
|
|
|
@ -234,7 +234,7 @@ static __attribute__((__noreturn__)) void bgp_exit(int status)
|
||||||
bgp_zebra_destroy();
|
bgp_zebra_destroy();
|
||||||
|
|
||||||
bf_free(bm->rd_idspace);
|
bf_free(bm->rd_idspace);
|
||||||
list_delete_and_null(&bm->bgp);
|
list_delete(&bm->bgp);
|
||||||
memset(bm, 0, sizeof(*bm));
|
memset(bm, 0, sizeof(*bm));
|
||||||
|
|
||||||
frr_fini();
|
frr_fini();
|
||||||
|
|
|
@ -226,7 +226,7 @@ static void bgp_address_hash_free(void *data)
|
||||||
{
|
{
|
||||||
struct bgp_addr *addr = data;
|
struct bgp_addr *addr = data;
|
||||||
|
|
||||||
list_delete_and_null(&addr->ifp_name_list);
|
list_delete(&addr->ifp_name_list);
|
||||||
XFREE(MTYPE_BGP_ADDR, addr);
|
XFREE(MTYPE_BGP_ADDR, addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ static void bgp_address_del(struct bgp *bgp, struct connected *ifc,
|
||||||
|
|
||||||
if (addr->ifp_name_list->count == 0) {
|
if (addr->ifp_name_list->count == 0) {
|
||||||
hash_release(bgp->address_hash, addr);
|
hash_release(bgp->address_hash, addr);
|
||||||
list_delete_and_null(&addr->ifp_name_list);
|
list_delete(&addr->ifp_name_list);
|
||||||
XFREE(MTYPE_BGP_ADDR, addr);
|
XFREE(MTYPE_BGP_ADDR, addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,7 +215,7 @@ static void bgp_info_extra_free(struct bgp_info_extra **extra)
|
||||||
bgp_unlock(e->bgp_orig);
|
bgp_unlock(e->bgp_orig);
|
||||||
|
|
||||||
if ((*extra)->bgp_fs_pbr)
|
if ((*extra)->bgp_fs_pbr)
|
||||||
list_delete_and_null(&((*extra)->bgp_fs_pbr));
|
list_delete(&((*extra)->bgp_fs_pbr));
|
||||||
XFREE(MTYPE_BGP_ROUTE_EXTRA, *extra);
|
XFREE(MTYPE_BGP_ROUTE_EXTRA, *extra);
|
||||||
|
|
||||||
*extra = NULL;
|
*extra = NULL;
|
||||||
|
|
|
@ -402,7 +402,7 @@ static int bgpd_sync_callback(struct thread *thread)
|
||||||
revalidate_bgp_node(bgp_node, afi,
|
revalidate_bgp_node(bgp_node, afi,
|
||||||
safi);
|
safi);
|
||||||
|
|
||||||
list_delete_and_null(&matches);
|
list_delete(&matches);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -539,7 +539,7 @@ static int bgp_rpki_init(struct thread_master *master)
|
||||||
static int bgp_rpki_fini(void)
|
static int bgp_rpki_fini(void)
|
||||||
{
|
{
|
||||||
stop();
|
stop();
|
||||||
list_delete_and_null(&cache_list);
|
list_delete(&cache_list);
|
||||||
|
|
||||||
close(rpki_sync_socket_rtr);
|
close(rpki_sync_socket_rtr);
|
||||||
close(rpki_sync_socket_bgpd);
|
close(rpki_sync_socket_bgpd);
|
||||||
|
|
|
@ -1580,7 +1580,7 @@ static void bgp_redist_del(struct bgp *bgp, afi_t afi, uint8_t type,
|
||||||
listnode_delete(bgp->redist[afi][type], red);
|
listnode_delete(bgp->redist[afi][type], red);
|
||||||
XFREE(MTYPE_BGP_REDIST, red);
|
XFREE(MTYPE_BGP_REDIST, red);
|
||||||
if (!bgp->redist[afi][type]->count)
|
if (!bgp->redist[afi][type]->count)
|
||||||
list_delete_and_null(&bgp->redist[afi][type]);
|
list_delete(&bgp->redist[afi][type]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
14
bgpd/bgpd.c
14
bgpd/bgpd.c
|
@ -2426,14 +2426,14 @@ int peer_group_delete(struct peer_group *group)
|
||||||
peer_delete(other);
|
peer_delete(other);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list_delete_and_null(&group->peer);
|
list_delete(&group->peer);
|
||||||
|
|
||||||
for (afi = AFI_IP; afi < AFI_MAX; afi++) {
|
for (afi = AFI_IP; afi < AFI_MAX; afi++) {
|
||||||
for (ALL_LIST_ELEMENTS(group->listen_range[afi], node, nnode,
|
for (ALL_LIST_ELEMENTS(group->listen_range[afi], node, nnode,
|
||||||
prefix)) {
|
prefix)) {
|
||||||
prefix_free(prefix);
|
prefix_free(prefix);
|
||||||
}
|
}
|
||||||
list_delete_and_null(&group->listen_range[afi]);
|
list_delete(&group->listen_range[afi]);
|
||||||
}
|
}
|
||||||
|
|
||||||
XFREE(MTYPE_PEER_GROUP_HOST, group->name);
|
XFREE(MTYPE_PEER_GROUP_HOST, group->name);
|
||||||
|
@ -3221,8 +3221,8 @@ void bgp_free(struct bgp *bgp)
|
||||||
|
|
||||||
QOBJ_UNREG(bgp);
|
QOBJ_UNREG(bgp);
|
||||||
|
|
||||||
list_delete_and_null(&bgp->group);
|
list_delete(&bgp->group);
|
||||||
list_delete_and_null(&bgp->peer);
|
list_delete(&bgp->peer);
|
||||||
|
|
||||||
if (bgp->peerhash) {
|
if (bgp->peerhash) {
|
||||||
hash_free(bgp->peerhash);
|
hash_free(bgp->peerhash);
|
||||||
|
@ -3264,9 +3264,9 @@ void bgp_free(struct bgp *bgp)
|
||||||
vpn_policy_direction_t dir;
|
vpn_policy_direction_t dir;
|
||||||
|
|
||||||
if (bgp->vpn_policy[afi].import_vrf)
|
if (bgp->vpn_policy[afi].import_vrf)
|
||||||
list_delete_and_null(&bgp->vpn_policy[afi].import_vrf);
|
list_delete(&bgp->vpn_policy[afi].import_vrf);
|
||||||
if (bgp->vpn_policy[afi].export_vrf)
|
if (bgp->vpn_policy[afi].export_vrf)
|
||||||
list_delete_and_null(&bgp->vpn_policy[afi].export_vrf);
|
list_delete(&bgp->vpn_policy[afi].export_vrf);
|
||||||
|
|
||||||
dir = BGP_VPN_POLICY_DIR_FROMVPN;
|
dir = BGP_VPN_POLICY_DIR_FROMVPN;
|
||||||
if (bgp->vpn_policy[afi].rtlist[dir])
|
if (bgp->vpn_policy[afi].rtlist[dir])
|
||||||
|
@ -7864,7 +7864,7 @@ void bgp_terminate(void)
|
||||||
bgp_close();
|
bgp_close();
|
||||||
|
|
||||||
if (bm->listen_sockets)
|
if (bm->listen_sockets)
|
||||||
list_delete_and_null(&bm->listen_sockets);
|
list_delete(&bm->listen_sockets);
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS(bm->bgp, mnode, mnnode, bgp))
|
for (ALL_LIST_ELEMENTS(bm->bgp, mnode, mnnode, bgp))
|
||||||
for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer))
|
for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer))
|
||||||
|
|
|
@ -2290,7 +2290,7 @@ static void bgp_rfapi_delete_nve_group(struct vty *vty, /* NULL = no output */
|
||||||
listnode_delete(rfg->nves, rfd);
|
listnode_delete(rfg->nves, rfd);
|
||||||
listnode_add(orphaned_nves, rfd);
|
listnode_add(orphaned_nves, rfd);
|
||||||
}
|
}
|
||||||
list_delete_and_null(&rfg->nves);
|
list_delete(&rfg->nves);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* delete it */
|
/* delete it */
|
||||||
|
@ -2367,7 +2367,7 @@ static void bgp_rfapi_delete_nve_group(struct vty *vty, /* NULL = no output */
|
||||||
if (vty)
|
if (vty)
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
}
|
}
|
||||||
list_delete_and_null(&orphaned_nves);
|
list_delete(&orphaned_nves);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3395,7 +3395,7 @@ static void bgp_rfapi_delete_l2_group(struct vty *vty, /* NULL = no output */
|
||||||
if (rfg->rt_export_list)
|
if (rfg->rt_export_list)
|
||||||
ecommunity_free(&rfg->rt_export_list);
|
ecommunity_free(&rfg->rt_export_list);
|
||||||
if (rfg->labels)
|
if (rfg->labels)
|
||||||
list_delete_and_null(&rfg->labels);
|
list_delete(&rfg->labels);
|
||||||
if (rfg->rfp_cfg)
|
if (rfg->rfp_cfg)
|
||||||
XFREE(MTYPE_RFAPI_RFP_GROUP_CFG, rfg->rfp_cfg);
|
XFREE(MTYPE_RFAPI_RFP_GROUP_CFG, rfg->rfp_cfg);
|
||||||
listnode_delete(bgp->rfapi_cfg->l2_groups, rfg);
|
listnode_delete(bgp->rfapi_cfg->l2_groups, rfg);
|
||||||
|
@ -3809,10 +3809,10 @@ void bgp_rfapi_cfg_destroy(struct bgp *bgp, struct rfapi_cfg *h)
|
||||||
bgp_rfapi_delete_named_nve_group(NULL, bgp, NULL, RFAPI_GROUP_CFG_MAX);
|
bgp_rfapi_delete_named_nve_group(NULL, bgp, NULL, RFAPI_GROUP_CFG_MAX);
|
||||||
bgp_rfapi_delete_named_l2_group(NULL, bgp, NULL);
|
bgp_rfapi_delete_named_l2_group(NULL, bgp, NULL);
|
||||||
if (h->l2_groups != NULL)
|
if (h->l2_groups != NULL)
|
||||||
list_delete_and_null(&h->l2_groups);
|
list_delete(&h->l2_groups);
|
||||||
list_delete_and_null(&h->nve_groups_sequential);
|
list_delete(&h->nve_groups_sequential);
|
||||||
list_delete_and_null(&h->rfg_export_direct_bgp_l);
|
list_delete(&h->rfg_export_direct_bgp_l);
|
||||||
list_delete_and_null(&h->rfg_export_zebra_l);
|
list_delete(&h->rfg_export_zebra_l);
|
||||||
if (h->default_rt_export_list)
|
if (h->default_rt_export_list)
|
||||||
ecommunity_free(&h->default_rt_export_list);
|
ecommunity_free(&h->default_rt_export_list);
|
||||||
if (h->default_rt_import_list)
|
if (h->default_rt_import_list)
|
||||||
|
|
|
@ -483,7 +483,7 @@ void del_vnc_route(struct rfapi_descriptor *rfd,
|
||||||
* Delete local_nexthops list
|
* Delete local_nexthops list
|
||||||
*/
|
*/
|
||||||
if (bi->extra && bi->extra->vnc.export.local_nexthops) {
|
if (bi->extra && bi->extra->vnc.export.local_nexthops) {
|
||||||
list_delete_and_null(
|
list_delete(
|
||||||
&bi->extra->vnc.export.local_nexthops);
|
&bi->extra->vnc.export.local_nexthops);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -508,7 +508,7 @@ void rfapiRibClear(struct rfapi_descriptor *rfd)
|
||||||
*/
|
*/
|
||||||
if (pn->info) {
|
if (pn->info) {
|
||||||
if (pn->info != (void *)1) {
|
if (pn->info != (void *)1) {
|
||||||
list_delete_and_null(
|
list_delete(
|
||||||
(struct list *
|
(struct list *
|
||||||
*)(&pn->info));
|
*)(&pn->info));
|
||||||
}
|
}
|
||||||
|
@ -1433,7 +1433,7 @@ callback:
|
||||||
}
|
}
|
||||||
|
|
||||||
delete_list->del = (void (*)(void *))rfapi_info_free;
|
delete_list->del = (void (*)(void *))rfapi_info_free;
|
||||||
list_delete_and_null(&delete_list);
|
list_delete(&delete_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
RFAPI_RIB_CHECK_COUNTS(0, 0);
|
RFAPI_RIB_CHECK_COUNTS(0, 0);
|
||||||
|
@ -1448,7 +1448,7 @@ callback:
|
||||||
agg_unlock_node(pn);
|
agg_unlock_node(pn);
|
||||||
}
|
}
|
||||||
if (lPendCost) {
|
if (lPendCost) {
|
||||||
list_delete_and_null(&lPendCost);
|
list_delete(&lPendCost);
|
||||||
pn->info = NULL;
|
pn->info = NULL;
|
||||||
agg_unlock_node(pn);
|
agg_unlock_node(pn);
|
||||||
}
|
}
|
||||||
|
@ -1633,7 +1633,7 @@ void rfapiRibUpdatePendingNode(
|
||||||
*/
|
*/
|
||||||
if (pn->info) {
|
if (pn->info) {
|
||||||
if (pn->info != (void *)1) {
|
if (pn->info != (void *)1) {
|
||||||
list_delete_and_null((struct list **)(&pn->info));
|
list_delete((struct list **)(&pn->info));
|
||||||
}
|
}
|
||||||
pn->info = NULL;
|
pn->info = NULL;
|
||||||
agg_unlock_node(pn); /* linklist or 1 deleted */
|
agg_unlock_node(pn); /* linklist or 1 deleted */
|
||||||
|
|
|
@ -3268,7 +3268,7 @@ static int rfapiDeleteLocalPrefixesByRFD(struct rfapi_local_reg_delete_arg *cda,
|
||||||
}
|
}
|
||||||
list_delete_all_node(adb_delete_list);
|
list_delete_all_node(adb_delete_list);
|
||||||
}
|
}
|
||||||
list_delete_and_null(&adb_delete_list);
|
list_delete(&adb_delete_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1610,7 +1610,7 @@ void vnc_direct_bgp_vpn_disable(struct bgp *bgp, afi_t afi)
|
||||||
if (nve_list) {
|
if (nve_list) {
|
||||||
vnc_direct_bgp_unexport_table(
|
vnc_direct_bgp_unexport_table(
|
||||||
afi, it->imported_vpn[afi], nve_list);
|
afi, it->imported_vpn[afi], nve_list);
|
||||||
list_delete_and_null(&nve_list);
|
list_delete(&nve_list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2404,7 +2404,7 @@ void vnc_import_bgp_exterior_add_route_interior(
|
||||||
skiplist_delete(it->monitor_exterior_orphans,
|
skiplist_delete(it->monitor_exterior_orphans,
|
||||||
an_bi_exterior, NULL);
|
an_bi_exterior, NULL);
|
||||||
}
|
}
|
||||||
list_delete_and_null(&list_adopted);
|
list_delete(&list_adopted);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -596,7 +596,7 @@ static void vnc_zebra_add_del_prefix(struct bgp *bgp,
|
||||||
nve_list_to_nh_array(rn->p.family, nves, &nexthop_count,
|
nve_list_to_nh_array(rn->p.family, nves, &nexthop_count,
|
||||||
&nh_ary, &nhp_ary);
|
&nh_ary, &nhp_ary);
|
||||||
|
|
||||||
list_delete_and_null(&nves);
|
list_delete(&nves);
|
||||||
|
|
||||||
if (nexthop_count)
|
if (nexthop_count)
|
||||||
vnc_zebra_route_msg(&rn->p, nexthop_count, nhp_ary,
|
vnc_zebra_route_msg(&rn->p, nexthop_count, nhp_ary,
|
||||||
|
@ -768,7 +768,7 @@ static void vnc_zebra_add_del_group_afi(struct bgp *bgp,
|
||||||
vnc_zlog_debug_verbose("%s: family: %d, nve count: %d",
|
vnc_zlog_debug_verbose("%s: family: %d, nve count: %d",
|
||||||
__func__, family, nexthop_count);
|
__func__, family, nexthop_count);
|
||||||
|
|
||||||
list_delete_and_null(&nves);
|
list_delete(&nves);
|
||||||
|
|
||||||
if (nexthop_count) {
|
if (nexthop_count) {
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -300,7 +300,7 @@ void show_ip_eigrp_prefix_entry(struct vty *vty, struct eigrp_prefix_entry *tn)
|
||||||
tn->serno);
|
tn->serno);
|
||||||
|
|
||||||
if (successors)
|
if (successors)
|
||||||
list_delete_and_null(&successors);
|
list_delete(&successors);
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_ip_eigrp_nexthop_entry(struct vty *vty, struct eigrp *eigrp,
|
void show_ip_eigrp_nexthop_entry(struct vty *vty, struct eigrp *eigrp,
|
||||||
|
|
|
@ -453,7 +453,7 @@ int eigrp_fsm_event_nq_fcn(struct eigrp_fsm_action_message *msg)
|
||||||
// neighbors left
|
// neighbors left
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(&successors);
|
list_delete(&successors);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -479,7 +479,7 @@ int eigrp_fsm_event_q_fcn(struct eigrp_fsm_action_message *msg)
|
||||||
// neighbors left
|
// neighbors left
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(&successors);
|
list_delete(&successors);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -530,7 +530,7 @@ int eigrp_fsm_event_lr(struct eigrp_fsm_action_message *msg)
|
||||||
|
|
||||||
ne = listnode_head(successors);
|
ne = listnode_head(successors);
|
||||||
eigrp_send_reply(ne->adv_router, prefix);
|
eigrp_send_reply(ne->adv_router, prefix);
|
||||||
list_delete_and_null(&successors);
|
list_delete(&successors);
|
||||||
}
|
}
|
||||||
|
|
||||||
prefix->state = EIGRP_FSM_STATE_PASSIVE;
|
prefix->state = EIGRP_FSM_STATE_PASSIVE;
|
||||||
|
@ -560,7 +560,7 @@ int eigrp_fsm_event_dinc(struct eigrp_fsm_action_message *msg)
|
||||||
msg);
|
msg);
|
||||||
|
|
||||||
|
|
||||||
list_delete_and_null(&successors);
|
list_delete(&successors);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -584,7 +584,7 @@ int eigrp_fsm_event_lr_fcs(struct eigrp_fsm_action_message *msg)
|
||||||
ne = listnode_head(successors);
|
ne = listnode_head(successors);
|
||||||
eigrp_send_reply(ne->adv_router, prefix);
|
eigrp_send_reply(ne->adv_router, prefix);
|
||||||
|
|
||||||
list_delete_and_null(&successors);
|
list_delete(&successors);
|
||||||
}
|
}
|
||||||
prefix->req_action |= EIGRP_FSM_NEED_UPDATE;
|
prefix->req_action |= EIGRP_FSM_NEED_UPDATE;
|
||||||
listnode_add(eigrp->topology_changes_internalIPV4, prefix);
|
listnode_add(eigrp->topology_changes_internalIPV4, prefix);
|
||||||
|
@ -620,7 +620,7 @@ int eigrp_fsm_event_lr_fcn(struct eigrp_fsm_action_message *msg)
|
||||||
// neighbors left
|
// neighbors left
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(&successors);
|
list_delete(&successors);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -636,6 +636,6 @@ int eigrp_fsm_event_qact(struct eigrp_fsm_action_message *msg)
|
||||||
msg->prefix->state = EIGRP_FSM_STATE_ACTIVE_2;
|
msg->prefix->state = EIGRP_FSM_STATE_ACTIVE_2;
|
||||||
msg->prefix->distance = ne->distance;
|
msg->prefix->distance = ne->distance;
|
||||||
|
|
||||||
list_delete_and_null(&successors);
|
list_delete(&successors);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ int eigrp_if_delete_hook(struct interface *ifp)
|
||||||
if (!ei)
|
if (!ei)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
list_delete_and_null(&ei->nbrs);
|
list_delete(&ei->nbrs);
|
||||||
|
|
||||||
eigrp = ei->eigrp;
|
eigrp = ei->eigrp;
|
||||||
listnode_delete(eigrp->eiflist, ei);
|
listnode_delete(eigrp->eiflist, ei);
|
||||||
|
@ -351,7 +351,7 @@ void eigrp_if_free(struct eigrp_interface *ei, int source)
|
||||||
|
|
||||||
eigrp_if_down(ei);
|
eigrp_if_down(ei);
|
||||||
|
|
||||||
list_delete_and_null(&ei->nbrs);
|
list_delete(&ei->nbrs);
|
||||||
listnode_delete(ei->eigrp->eiflist, ei);
|
listnode_delete(ei->eigrp->eiflist, ei);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ void eigrp_nexthop_entry_add(struct eigrp_prefix_entry *node,
|
||||||
eigrp_zebra_route_add(node->destination, l);
|
eigrp_zebra_route_add(node->destination, l);
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(&l);
|
list_delete(&l);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -193,8 +193,8 @@ void eigrp_prefix_entry_delete(struct route_table *table,
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS(pe->entries, node, nnode, ne))
|
for (ALL_LIST_ELEMENTS(pe->entries, node, nnode, ne))
|
||||||
eigrp_nexthop_entry_delete(pe, ne);
|
eigrp_nexthop_entry_delete(pe, ne);
|
||||||
list_delete_and_null(&pe->entries);
|
list_delete(&pe->entries);
|
||||||
list_delete_and_null(&pe->rij);
|
list_delete(&pe->rij);
|
||||||
eigrp_zebra_route_delete(pe->destination);
|
eigrp_zebra_route_delete(pe->destination);
|
||||||
prefix_free(pe->destination);
|
prefix_free(pe->destination);
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ struct list *eigrp_topology_get_successor(struct eigrp_prefix_entry *table_node)
|
||||||
* If we have no successors return NULL
|
* If we have no successors return NULL
|
||||||
*/
|
*/
|
||||||
if (!successors->count) {
|
if (!successors->count) {
|
||||||
list_delete_and_null(&successors);
|
list_delete(&successors);
|
||||||
successors = NULL;
|
successors = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ void eigrp_update_routing_table(struct eigrp_prefix_entry *prefix)
|
||||||
for (ALL_LIST_ELEMENTS_RO(successors, node, entry))
|
for (ALL_LIST_ELEMENTS_RO(successors, node, entry))
|
||||||
entry->flags |= EIGRP_NEXTHOP_ENTRY_INTABLE_FLAG;
|
entry->flags |= EIGRP_NEXTHOP_ENTRY_INTABLE_FLAG;
|
||||||
|
|
||||||
list_delete_and_null(&successors);
|
list_delete(&successors);
|
||||||
} else {
|
} else {
|
||||||
eigrp_zebra_route_delete(prefix->destination);
|
eigrp_zebra_route_delete(prefix->destination);
|
||||||
for (ALL_LIST_ELEMENTS_RO(prefix->entries, node, entry))
|
for (ALL_LIST_ELEMENTS_RO(prefix->entries, node, entry))
|
||||||
|
|
|
@ -411,7 +411,7 @@ void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph,
|
||||||
eigrp_update_send_all(eigrp, ei);
|
eigrp_update_send_all(eigrp, ei);
|
||||||
|
|
||||||
if (nbr_prefixes)
|
if (nbr_prefixes)
|
||||||
list_delete_and_null(&nbr_prefixes);
|
list_delete(&nbr_prefixes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*send EIGRP Update packet*/
|
/*send EIGRP Update packet*/
|
||||||
|
|
|
@ -266,15 +266,15 @@ void eigrp_finish_final(struct eigrp *eigrp)
|
||||||
THREAD_OFF(eigrp->t_read);
|
THREAD_OFF(eigrp->t_read);
|
||||||
close(eigrp->fd);
|
close(eigrp->fd);
|
||||||
|
|
||||||
list_delete_and_null(&eigrp->eiflist);
|
list_delete(&eigrp->eiflist);
|
||||||
list_delete_and_null(&eigrp->oi_write_q);
|
list_delete(&eigrp->oi_write_q);
|
||||||
|
|
||||||
eigrp_topology_free(eigrp->topology_table);
|
eigrp_topology_free(eigrp->topology_table);
|
||||||
|
|
||||||
eigrp_nbr_delete(eigrp->neighbor_self);
|
eigrp_nbr_delete(eigrp->neighbor_self);
|
||||||
|
|
||||||
list_delete_and_null(&eigrp->topology_changes_externalIPV4);
|
list_delete(&eigrp->topology_changes_externalIPV4);
|
||||||
list_delete_and_null(&eigrp->topology_changes_internalIPV4);
|
list_delete(&eigrp->topology_changes_internalIPV4);
|
||||||
|
|
||||||
listnode_delete(eigrp_om->eigrp, eigrp);
|
listnode_delete(eigrp_om->eigrp, eigrp);
|
||||||
|
|
||||||
|
|
|
@ -449,17 +449,17 @@ void isis_circuit_if_del(struct isis_circuit *circuit, struct interface *ifp)
|
||||||
|
|
||||||
if (circuit->ip_addrs) {
|
if (circuit->ip_addrs) {
|
||||||
assert(listcount(circuit->ip_addrs) == 0);
|
assert(listcount(circuit->ip_addrs) == 0);
|
||||||
list_delete_and_null(&circuit->ip_addrs);
|
list_delete(&circuit->ip_addrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (circuit->ipv6_link) {
|
if (circuit->ipv6_link) {
|
||||||
assert(listcount(circuit->ipv6_link) == 0);
|
assert(listcount(circuit->ipv6_link) == 0);
|
||||||
list_delete_and_null(&circuit->ipv6_link);
|
list_delete(&circuit->ipv6_link);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (circuit->ipv6_non_link) {
|
if (circuit->ipv6_non_link) {
|
||||||
assert(listcount(circuit->ipv6_non_link) == 0);
|
assert(listcount(circuit->ipv6_non_link) == 0);
|
||||||
list_delete_and_null(&circuit->ipv6_non_link);
|
list_delete(&circuit->ipv6_non_link);
|
||||||
}
|
}
|
||||||
|
|
||||||
circuit->circ_type = CIRCUIT_T_UNKNOWN;
|
circuit->circ_type = CIRCUIT_T_UNKNOWN;
|
||||||
|
@ -685,22 +685,22 @@ void isis_circuit_down(struct isis_circuit *circuit)
|
||||||
if (circuit->circ_type == CIRCUIT_T_BROADCAST) {
|
if (circuit->circ_type == CIRCUIT_T_BROADCAST) {
|
||||||
/* destroy neighbour lists */
|
/* destroy neighbour lists */
|
||||||
if (circuit->u.bc.lan_neighs[0]) {
|
if (circuit->u.bc.lan_neighs[0]) {
|
||||||
list_delete_and_null(&circuit->u.bc.lan_neighs[0]);
|
list_delete(&circuit->u.bc.lan_neighs[0]);
|
||||||
circuit->u.bc.lan_neighs[0] = NULL;
|
circuit->u.bc.lan_neighs[0] = NULL;
|
||||||
}
|
}
|
||||||
if (circuit->u.bc.lan_neighs[1]) {
|
if (circuit->u.bc.lan_neighs[1]) {
|
||||||
list_delete_and_null(&circuit->u.bc.lan_neighs[1]);
|
list_delete(&circuit->u.bc.lan_neighs[1]);
|
||||||
circuit->u.bc.lan_neighs[1] = NULL;
|
circuit->u.bc.lan_neighs[1] = NULL;
|
||||||
}
|
}
|
||||||
/* destroy adjacency databases */
|
/* destroy adjacency databases */
|
||||||
if (circuit->u.bc.adjdb[0]) {
|
if (circuit->u.bc.adjdb[0]) {
|
||||||
circuit->u.bc.adjdb[0]->del = isis_delete_adj;
|
circuit->u.bc.adjdb[0]->del = isis_delete_adj;
|
||||||
list_delete_and_null(&circuit->u.bc.adjdb[0]);
|
list_delete(&circuit->u.bc.adjdb[0]);
|
||||||
circuit->u.bc.adjdb[0] = NULL;
|
circuit->u.bc.adjdb[0] = NULL;
|
||||||
}
|
}
|
||||||
if (circuit->u.bc.adjdb[1]) {
|
if (circuit->u.bc.adjdb[1]) {
|
||||||
circuit->u.bc.adjdb[1]->del = isis_delete_adj;
|
circuit->u.bc.adjdb[1]->del = isis_delete_adj;
|
||||||
list_delete_and_null(&circuit->u.bc.adjdb[1]);
|
list_delete(&circuit->u.bc.adjdb[1]);
|
||||||
circuit->u.bc.adjdb[1] = NULL;
|
circuit->u.bc.adjdb[1] = NULL;
|
||||||
}
|
}
|
||||||
if (circuit->u.bc.is_dr[0]) {
|
if (circuit->u.bc.is_dr[0]) {
|
||||||
|
|
|
@ -135,7 +135,7 @@ int isis_dr_elect(struct isis_circuit *circuit, int level)
|
||||||
|
|
||||||
if (!adjdb) {
|
if (!adjdb) {
|
||||||
zlog_warn("isis_dr_elect() adjdb == NULL");
|
zlog_warn("isis_dr_elect() adjdb == NULL");
|
||||||
list_delete_and_null(&list);
|
list_delete(&list);
|
||||||
return ISIS_WARNING;
|
return ISIS_WARNING;
|
||||||
}
|
}
|
||||||
isis_adj_build_up_list(adjdb, list);
|
isis_adj_build_up_list(adjdb, list);
|
||||||
|
@ -177,7 +177,7 @@ int isis_dr_elect(struct isis_circuit *circuit, int level)
|
||||||
*/
|
*/
|
||||||
if (circuit->u.bc.is_dr[level - 1])
|
if (circuit->u.bc.is_dr[level - 1])
|
||||||
retval = isis_dr_resign(circuit, level);
|
retval = isis_dr_resign(circuit, level);
|
||||||
list_delete_and_null(&list);
|
list_delete(&list);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ int isis_dr_elect(struct isis_circuit *circuit, int level)
|
||||||
if (circuit->u.bc.is_dr[level - 1])
|
if (circuit->u.bc.is_dr[level - 1])
|
||||||
retval = isis_dr_resign(circuit, level);
|
retval = isis_dr_resign(circuit, level);
|
||||||
}
|
}
|
||||||
list_delete_and_null(&list);
|
list_delete(&list);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ static void circuit_resign_level(struct isis_circuit *circuit, int level)
|
||||||
circuit->lsp_regenerate_pending[idx] = 0;
|
circuit->lsp_regenerate_pending[idx] = 0;
|
||||||
circuit->u.bc.run_dr_elect[idx] = 0;
|
circuit->u.bc.run_dr_elect[idx] = 0;
|
||||||
if (circuit->u.bc.lan_neighs[idx] != NULL)
|
if (circuit->u.bc.lan_neighs[idx] != NULL)
|
||||||
list_delete_and_null(&circuit->u.bc.lan_neighs[idx]);
|
list_delete(&circuit->u.bc.lan_neighs[idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -126,7 +126,7 @@ static void lsp_destroy(struct isis_lsp *lsp)
|
||||||
lsp_clear_data(lsp);
|
lsp_clear_data(lsp);
|
||||||
|
|
||||||
if (LSP_FRAGMENT(lsp->hdr.lsp_id) == 0 && lsp->lspu.frags) {
|
if (LSP_FRAGMENT(lsp->hdr.lsp_id) == 0 && lsp->lspu.frags) {
|
||||||
list_delete_and_null(&lsp->lspu.frags);
|
list_delete(&lsp->lspu.frags);
|
||||||
lsp->lspu.frags = NULL;
|
lsp->lspu.frags = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1181,7 +1181,7 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area)
|
||||||
frag->tlvs = tlvs;
|
frag->tlvs = tlvs;
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(&fragments);
|
list_delete(&fragments);
|
||||||
lsp_debug("ISIS (%s): LSP construction is complete. Serializing...",
|
lsp_debug("ISIS (%s): LSP construction is complete. Serializing...",
|
||||||
area->area_tag);
|
area->area_tag);
|
||||||
return;
|
return;
|
||||||
|
@ -1560,7 +1560,7 @@ static void lsp_build_pseudo(struct isis_lsp *lsp, struct isis_circuit *circuit,
|
||||||
LSP_PSEUDO_ID(ne_id));
|
LSP_PSEUDO_ID(ne_id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list_delete_and_null(&adj_list);
|
list_delete(&adj_list);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ void area_mt_init(struct isis_area *area)
|
||||||
|
|
||||||
void area_mt_finish(struct isis_area *area)
|
void area_mt_finish(struct isis_area *area)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&area->mt_settings);
|
list_delete(&area->mt_settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct isis_area_mt_setting *area_get_mt_setting(struct isis_area *area,
|
struct isis_area_mt_setting *area_get_mt_setting(struct isis_area *area,
|
||||||
|
@ -286,7 +286,7 @@ void circuit_mt_init(struct isis_circuit *circuit)
|
||||||
|
|
||||||
void circuit_mt_finish(struct isis_circuit *circuit)
|
void circuit_mt_finish(struct isis_circuit *circuit)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&circuit->mt_settings);
|
list_delete(&circuit->mt_settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct isis_circuit_mt_setting *
|
struct isis_circuit_mt_setting *
|
||||||
|
|
|
@ -1356,7 +1356,7 @@ static int process_snp(uint8_t pdu_type, struct isis_circuit *circuit,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* lets free it */
|
/* lets free it */
|
||||||
list_delete_and_null(&lsp_list);
|
list_delete(&lsp_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fabricd_initial_sync_is_complete(circuit->area) && resync_needed)
|
if (fabricd_initial_sync_is_complete(circuit->area) && resync_needed)
|
||||||
|
|
|
@ -253,13 +253,13 @@ static void isis_route_info_delete(struct isis_route_info *route_info)
|
||||||
if (route_info->nexthops) {
|
if (route_info->nexthops) {
|
||||||
route_info->nexthops->del =
|
route_info->nexthops->del =
|
||||||
(void (*)(void *))isis_nexthop_delete;
|
(void (*)(void *))isis_nexthop_delete;
|
||||||
list_delete_and_null(&route_info->nexthops);
|
list_delete(&route_info->nexthops);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (route_info->nexthops6) {
|
if (route_info->nexthops6) {
|
||||||
route_info->nexthops6->del =
|
route_info->nexthops6->del =
|
||||||
(void (*)(void *))isis_nexthop6_delete;
|
(void (*)(void *))isis_nexthop6_delete;
|
||||||
list_delete_and_null(&route_info->nexthops6);
|
list_delete(&route_info->nexthops6);
|
||||||
}
|
}
|
||||||
|
|
||||||
XFREE(MTYPE_ISIS_ROUTE_INFO, route_info);
|
XFREE(MTYPE_ISIS_ROUTE_INFO, route_info);
|
||||||
|
|
|
@ -824,7 +824,7 @@ static int isis_spf_preload_tent(struct isis_spftree *spftree,
|
||||||
adjdb = circuit->u.bc.adjdb[spftree->level - 1];
|
adjdb = circuit->u.bc.adjdb[spftree->level - 1];
|
||||||
isis_adj_build_up_list(adjdb, adj_list);
|
isis_adj_build_up_list(adjdb, adj_list);
|
||||||
if (listcount(adj_list) == 0) {
|
if (listcount(adj_list) == 0) {
|
||||||
list_delete_and_null(&adj_list);
|
list_delete(&adj_list);
|
||||||
if (isis->debugs & DEBUG_SPF_EVENTS)
|
if (isis->debugs & DEBUG_SPF_EVENTS)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"ISIS-Spf: no L%d adjacencies on circuit %s",
|
"ISIS-Spf: no L%d adjacencies on circuit %s",
|
||||||
|
@ -890,7 +890,7 @@ static int isis_spf_preload_tent(struct isis_spftree *spftree,
|
||||||
"isis_spf_preload_tent unknow adj type");
|
"isis_spf_preload_tent unknow adj type");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list_delete_and_null(&adj_list);
|
list_delete(&adj_list);
|
||||||
/*
|
/*
|
||||||
* Add the pseudonode
|
* Add the pseudonode
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -168,8 +168,8 @@ static void isis_vertex_queue_init(struct isis_vertex_queue *queue,
|
||||||
__attribute__((__unused__))
|
__attribute__((__unused__))
|
||||||
static void isis_vertex_del(struct isis_vertex *vertex)
|
static void isis_vertex_del(struct isis_vertex *vertex)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&vertex->Adj_N);
|
list_delete(&vertex->Adj_N);
|
||||||
list_delete_and_null(&vertex->parents);
|
list_delete(&vertex->parents);
|
||||||
if (vertex->firsthops) {
|
if (vertex->firsthops) {
|
||||||
hash_clean(vertex->firsthops, NULL);
|
hash_clean(vertex->firsthops, NULL);
|
||||||
hash_free(vertex->firsthops);
|
hash_free(vertex->firsthops);
|
||||||
|
@ -212,7 +212,7 @@ static void isis_vertex_queue_free(struct isis_vertex_queue *queue)
|
||||||
skiplist_free(queue->l.slist);
|
skiplist_free(queue->l.slist);
|
||||||
queue->l.slist = NULL;
|
queue->l.slist = NULL;
|
||||||
} else
|
} else
|
||||||
list_delete_and_null(&queue->l.list);
|
list_delete(&queue->l.list);
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((__unused__))
|
__attribute__((__unused__))
|
||||||
|
|
|
@ -2946,7 +2946,7 @@ struct list *isis_fragment_tlvs(struct isis_tlvs *tlvs, size_t size)
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
for (ALL_LIST_ELEMENTS_RO(rv, node, fragment_tlvs))
|
for (ALL_LIST_ELEMENTS_RO(rv, node, fragment_tlvs))
|
||||||
isis_free_tlvs(fragment_tlvs);
|
isis_free_tlvs(fragment_tlvs);
|
||||||
list_delete_and_null(&rv);
|
list_delete(&rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
stream_free(dummy_stream);
|
stream_free(dummy_stream);
|
||||||
|
|
|
@ -226,7 +226,7 @@ int isis_area_destroy(struct vty *vty, const char *area_tag)
|
||||||
circuit->ipv6_router = 0;
|
circuit->ipv6_router = 0;
|
||||||
isis_csm_state_change(ISIS_DISABLE, circuit, area);
|
isis_csm_state_change(ISIS_DISABLE, circuit, area);
|
||||||
}
|
}
|
||||||
list_delete_and_null(&area->circuit_list);
|
list_delete(&area->circuit_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (area->lspdb[0] != NULL) {
|
if (area->lspdb[0] != NULL) {
|
||||||
|
|
|
@ -695,7 +695,7 @@ static vector cmd_complete_command_real(vector vline, struct vty *vty,
|
||||||
}
|
}
|
||||||
|
|
||||||
vector comps = completions_to_vec(completions);
|
vector comps = completions_to_vec(completions);
|
||||||
list_delete_and_null(&completions);
|
list_delete(&completions);
|
||||||
|
|
||||||
// set status code appropriately
|
// set status code appropriately
|
||||||
switch (vector_active(comps)) {
|
switch (vector_active(comps)) {
|
||||||
|
@ -1020,7 +1020,7 @@ static int cmd_execute_command_real(vector vline, enum filter_type filter,
|
||||||
// if matcher error, return corresponding CMD_ERR
|
// if matcher error, return corresponding CMD_ERR
|
||||||
if (MATCHER_ERROR(status)) {
|
if (MATCHER_ERROR(status)) {
|
||||||
if (argv_list)
|
if (argv_list)
|
||||||
list_delete_and_null(&argv_list);
|
list_delete(&argv_list);
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case MATCHER_INCOMPLETE:
|
case MATCHER_INCOMPLETE:
|
||||||
return CMD_ERR_INCOMPLETE;
|
return CMD_ERR_INCOMPLETE;
|
||||||
|
@ -1049,7 +1049,7 @@ static int cmd_execute_command_real(vector vline, enum filter_type filter,
|
||||||
ret = matched_element->func(matched_element, vty, argc, argv);
|
ret = matched_element->func(matched_element, vty, argc, argv);
|
||||||
|
|
||||||
// delete list and cmd_token's in it
|
// delete list and cmd_token's in it
|
||||||
list_delete_and_null(&argv_list);
|
list_delete(&argv_list);
|
||||||
XFREE(MTYPE_TMP, argv);
|
XFREE(MTYPE_TMP, argv);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -2949,6 +2949,6 @@ void cmd_terminate()
|
||||||
if (host.config)
|
if (host.config)
|
||||||
XFREE(MTYPE_HOST, host.config);
|
XFREE(MTYPE_HOST, host.config);
|
||||||
|
|
||||||
list_delete_and_null(&varhandlers);
|
list_delete(&varhandlers);
|
||||||
qobj_finish();
|
qobj_finish();
|
||||||
}
|
}
|
||||||
|
|
|
@ -334,7 +334,7 @@ static enum matcher_rv command_match_r(struct graph_node *start, vector vline,
|
||||||
status = MATCHER_INCOMPLETE;
|
status = MATCHER_INCOMPLETE;
|
||||||
|
|
||||||
// cleanup
|
// cleanup
|
||||||
list_delete_and_null(&next);
|
list_delete(&next);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -367,7 +367,7 @@ enum matcher_rv command_complete(struct graph *graph, vector vline,
|
||||||
|
|
||||||
unsigned int idx;
|
unsigned int idx;
|
||||||
for (idx = 0; idx < vector_active(vline) && next->count > 0; idx++) {
|
for (idx = 0; idx < vector_active(vline) && next->count > 0; idx++) {
|
||||||
list_delete_and_null(¤t);
|
list_delete(¤t);
|
||||||
current = next;
|
current = next;
|
||||||
next = list_new();
|
next = list_new();
|
||||||
next->del = stack_del;
|
next->del = stack_del;
|
||||||
|
@ -458,8 +458,8 @@ enum matcher_rv command_complete(struct graph *graph, vector vline,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(¤t);
|
list_delete(¤t);
|
||||||
list_delete_and_null(&next);
|
list_delete(&next);
|
||||||
|
|
||||||
return mrv;
|
return mrv;
|
||||||
}
|
}
|
||||||
|
@ -652,7 +652,7 @@ static void del_arglist(struct list *list)
|
||||||
list_delete_node(list, tail);
|
list_delete_node(list, tail);
|
||||||
|
|
||||||
// delete the rest of the list as usual
|
// delete the rest of the list as usual
|
||||||
list_delete_and_null(&list);
|
list_delete(&list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------- token level matching functions ----------*/
|
/*---------- token level matching functions ----------*/
|
||||||
|
|
|
@ -167,7 +167,7 @@ void log_ref_display(struct vty *vty, uint32_t code, bool json)
|
||||||
json_object_free(top);
|
json_object_free(top);
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(&errlist);
|
list_delete(&errlist);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN_NOSH(show_error_code,
|
DEFUN_NOSH(show_error_code,
|
||||||
|
|
|
@ -61,7 +61,7 @@ void frr_pthread_finish()
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&frr_pthread_list_mtx);
|
pthread_mutex_lock(&frr_pthread_list_mtx);
|
||||||
{
|
{
|
||||||
list_delete_and_null(&frr_pthread_list);
|
list_delete(&frr_pthread_list);
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&frr_pthread_list_mtx);
|
pthread_mutex_unlock(&frr_pthread_list_mtx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,7 @@ DEFUN (grammar_test_complete,
|
||||||
vty_out(vty, "%% No match\n");
|
vty_out(vty, "%% No match\n");
|
||||||
|
|
||||||
// free resources
|
// free resources
|
||||||
list_delete_and_null(&completions);
|
list_delete(&completions);
|
||||||
cmd_free_strvec(command);
|
cmd_free_strvec(command);
|
||||||
XFREE(MTYPE_TMP, cmdstr);
|
XFREE(MTYPE_TMP, cmdstr);
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ DEFUN (grammar_test_match,
|
||||||
|
|
||||||
vty_out(vty, "func: %p\n", element->func);
|
vty_out(vty, "func: %p\n", element->func);
|
||||||
|
|
||||||
list_delete_and_null(&argvv);
|
list_delete(&argvv);
|
||||||
} else {
|
} else {
|
||||||
assert(MATCHER_ERROR(result));
|
assert(MATCHER_ERROR(result));
|
||||||
switch (result) {
|
switch (result) {
|
||||||
|
@ -421,7 +421,7 @@ DEFUN (grammar_findambig,
|
||||||
}
|
}
|
||||||
prev = cur;
|
prev = cur;
|
||||||
}
|
}
|
||||||
list_delete_and_null(&commands);
|
list_delete(&commands);
|
||||||
|
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
} while (scan && scannode < LINK_PARAMS_NODE);
|
} while (scan && scannode < LINK_PARAMS_NODE);
|
||||||
|
|
|
@ -318,7 +318,7 @@ void hash_free(struct hash *hash)
|
||||||
if (_hashes) {
|
if (_hashes) {
|
||||||
listnode_delete(_hashes, hash);
|
listnode_delete(_hashes, hash);
|
||||||
if (_hashes->count == 0) {
|
if (_hashes->count == 0) {
|
||||||
list_delete_and_null(&_hashes);
|
list_delete(&_hashes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
lib/if.c
4
lib/if.c
|
@ -206,8 +206,8 @@ void if_delete(struct interface *ifp)
|
||||||
|
|
||||||
if_delete_retain(ifp);
|
if_delete_retain(ifp);
|
||||||
|
|
||||||
list_delete_and_null(&ifp->connected);
|
list_delete(&ifp->connected);
|
||||||
list_delete_and_null(&ifp->nbr_connected);
|
list_delete(&ifp->nbr_connected);
|
||||||
|
|
||||||
if_link_params_free(ifp);
|
if_link_params_free(ifp);
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ static void keychain_delete(struct keychain *keychain)
|
||||||
if (keychain->name)
|
if (keychain->name)
|
||||||
XFREE(MTYPE_KEYCHAIN, keychain->name);
|
XFREE(MTYPE_KEYCHAIN, keychain->name);
|
||||||
|
|
||||||
list_delete_and_null(&keychain->key);
|
list_delete(&keychain->key);
|
||||||
listnode_delete(keychain_list, keychain);
|
listnode_delete(keychain_list, keychain);
|
||||||
keychain_free(keychain);
|
keychain_free(keychain);
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,7 +240,7 @@ void list_delete_all_node(struct list *list)
|
||||||
list->count = 0;
|
list->count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void list_delete_and_null(struct list **list)
|
void list_delete(struct list **list)
|
||||||
{
|
{
|
||||||
assert(*list);
|
assert(*list);
|
||||||
list_delete_all_node(*list);
|
list_delete_all_node(*list);
|
||||||
|
@ -248,11 +248,6 @@ void list_delete_and_null(struct list **list)
|
||||||
*list = NULL;
|
*list = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void list_delete_original(struct list *list)
|
|
||||||
{
|
|
||||||
list_delete_and_null(&list);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct listnode *listnode_lookup(struct list *list, void *data)
|
struct listnode *listnode_lookup(struct list *list, void *data)
|
||||||
{
|
{
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
|
|
|
@ -235,20 +235,6 @@ extern struct list *list_dup(struct list *l);
|
||||||
extern void list_sort(struct list *list,
|
extern void list_sort(struct list *list,
|
||||||
int (*cmp)(const void **, const void **));
|
int (*cmp)(const void **, const void **));
|
||||||
|
|
||||||
/*
|
|
||||||
* The usage of list_delete is being transitioned to pass in
|
|
||||||
* the double pointer to remove use after free's.
|
|
||||||
* list_free usage is deprecated, it leads to memory leaks
|
|
||||||
* of the linklist nodes. Please use list_delete_and_null
|
|
||||||
*
|
|
||||||
* In Oct of 2018, rename list_delete_and_null to list_delete
|
|
||||||
* and remove list_delete_original and the list_delete #define
|
|
||||||
* Additionally remove list_free entirely
|
|
||||||
*/
|
|
||||||
#if CONFDATE > 20181001
|
|
||||||
CPP_NOTICE("list_delete without double pointer is deprecated, please fixup")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Delete a list and NULL its pointer.
|
* Delete a list and NULL its pointer.
|
||||||
*
|
*
|
||||||
|
@ -258,23 +244,7 @@ CPP_NOTICE("list_delete without double pointer is deprecated, please fixup")
|
||||||
* pointer to list pointer; this will be set to NULL after the list has been
|
* pointer to list pointer; this will be set to NULL after the list has been
|
||||||
* deleted
|
* deleted
|
||||||
*/
|
*/
|
||||||
extern void list_delete_and_null(struct list **plist);
|
extern void list_delete(struct list **plist);
|
||||||
|
|
||||||
/*
|
|
||||||
* Delete a list.
|
|
||||||
*
|
|
||||||
* If non-null, list->del is called with each data element.
|
|
||||||
*
|
|
||||||
* plist
|
|
||||||
* pointer to list pointer
|
|
||||||
*/
|
|
||||||
extern void list_delete_original(struct list *list);
|
|
||||||
#define list_delete(X) \
|
|
||||||
list_delete_original((X)) \
|
|
||||||
CPP_WARN("Please transition to using list_delete_and_null")
|
|
||||||
#define list_free(X) \
|
|
||||||
list_delete_original((X)) \
|
|
||||||
CPP_WARN("Please transition tousing list_delete_and_null")
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Delete all nodes from a list without deleting the list itself.
|
* Delete all nodes from a list without deleting the list itself.
|
||||||
|
|
|
@ -246,7 +246,7 @@ static void nhgc_delete(struct nexthop_group_cmd *nhgc)
|
||||||
|
|
||||||
RB_REMOVE(nhgc_entry_head, &nhgc_entries, nhgc);
|
RB_REMOVE(nhgc_entry_head, &nhgc_entries, nhgc);
|
||||||
|
|
||||||
list_delete_and_null(&nhgc->nhg_list);
|
list_delete(&nhgc->nhg_list);
|
||||||
|
|
||||||
XFREE(MTYPE_TMP, nhgc);
|
XFREE(MTYPE_TMP, nhgc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -991,7 +991,7 @@ static int vty_show_route_map(struct vty *vty, const char *name)
|
||||||
for (ALL_LIST_ELEMENTS_RO(maplist, ln, map))
|
for (ALL_LIST_ELEMENTS_RO(maplist, ln, map))
|
||||||
vty_show_route_map_entry(vty, map);
|
vty_show_route_map_entry(vty, map);
|
||||||
|
|
||||||
list_delete_and_null(&maplist);
|
list_delete(&maplist);
|
||||||
}
|
}
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -622,7 +622,7 @@ void thread_master_free(struct thread_master *m)
|
||||||
{
|
{
|
||||||
listnode_delete(masters, m);
|
listnode_delete(masters, m);
|
||||||
if (masters->count == 0) {
|
if (masters->count == 0) {
|
||||||
list_delete_and_null(&masters);
|
list_delete(&masters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&masters_mtx);
|
pthread_mutex_unlock(&masters_mtx);
|
||||||
|
@ -637,7 +637,7 @@ void thread_master_free(struct thread_master *m)
|
||||||
pthread_cond_destroy(&m->cancel_cond);
|
pthread_cond_destroy(&m->cancel_cond);
|
||||||
close(m->io_pipe[0]);
|
close(m->io_pipe[0]);
|
||||||
close(m->io_pipe[1]);
|
close(m->io_pipe[1]);
|
||||||
list_delete_and_null(&m->cancel_req);
|
list_delete(&m->cancel_req);
|
||||||
m->cancel_req = NULL;
|
m->cancel_req = NULL;
|
||||||
|
|
||||||
hash_clean(m->cpu_record, cpu_record_hash_free);
|
hash_clean(m->cpu_record, cpu_record_hash_free);
|
||||||
|
|
|
@ -115,7 +115,7 @@ void wheel_delete(struct timer_wheel *wheel)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < wheel->slots; i++) {
|
for (i = 0; i < wheel->slots; i++) {
|
||||||
list_delete_and_null(&wheel->wheel_slot_lists[i]);
|
list_delete(&wheel->wheel_slot_lists[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
THREAD_OFF(wheel->timer);
|
THREAD_OFF(wheel->timer);
|
||||||
|
|
|
@ -133,7 +133,7 @@ void redist_del_instance(struct redist_proto *red, unsigned short instance)
|
||||||
XFREE(MTYPE_REDIST_INST, id);
|
XFREE(MTYPE_REDIST_INST, id);
|
||||||
if (!red->instances->count) {
|
if (!red->instances->count) {
|
||||||
red->enabled = 0;
|
red->enabled = 0;
|
||||||
list_delete_and_null(&red->instances);
|
list_delete(&red->instances);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -277,7 +277,7 @@ void ospf6_area_delete(struct ospf6_area *oa)
|
||||||
for (ALL_LIST_ELEMENTS_RO(oa->if_list, n, oi))
|
for (ALL_LIST_ELEMENTS_RO(oa->if_list, n, oi))
|
||||||
oi->area = NULL;
|
oi->area = NULL;
|
||||||
|
|
||||||
list_delete_and_null(&oa->if_list);
|
list_delete(&oa->if_list);
|
||||||
|
|
||||||
ospf6_lsdb_delete(oa->lsdb);
|
ospf6_lsdb_delete(oa->lsdb);
|
||||||
ospf6_lsdb_delete(oa->lsdb_self);
|
ospf6_lsdb_delete(oa->lsdb_self);
|
||||||
|
|
|
@ -241,7 +241,7 @@ void ospf6_interface_delete(struct ospf6_interface *oi)
|
||||||
for (ALL_LIST_ELEMENTS(oi->neighbor_list, node, nnode, on))
|
for (ALL_LIST_ELEMENTS(oi->neighbor_list, node, nnode, on))
|
||||||
ospf6_neighbor_delete(on);
|
ospf6_neighbor_delete(on);
|
||||||
|
|
||||||
list_delete_and_null(&oi->neighbor_list);
|
list_delete(&oi->neighbor_list);
|
||||||
|
|
||||||
THREAD_OFF(oi->thread_send_hello);
|
THREAD_OFF(oi->thread_send_hello);
|
||||||
THREAD_OFF(oi->thread_send_lsupdate);
|
THREAD_OFF(oi->thread_send_lsupdate);
|
||||||
|
|
|
@ -365,7 +365,7 @@ static int ospf6_path_cmp(struct ospf6_path *a, struct ospf6_path *b)
|
||||||
void ospf6_path_free(struct ospf6_path *op)
|
void ospf6_path_free(struct ospf6_path *op)
|
||||||
{
|
{
|
||||||
if (op->nh_list)
|
if (op->nh_list)
|
||||||
list_delete_and_null(&op->nh_list);
|
list_delete(&op->nh_list);
|
||||||
XFREE(MTYPE_OSPF6_PATH, op);
|
XFREE(MTYPE_OSPF6_PATH, op);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -413,9 +413,9 @@ void ospf6_route_delete(struct ospf6_route *route)
|
||||||
{
|
{
|
||||||
if (route) {
|
if (route) {
|
||||||
if (route->nh_list)
|
if (route->nh_list)
|
||||||
list_delete_and_null(&route->nh_list);
|
list_delete(&route->nh_list);
|
||||||
if (route->paths)
|
if (route->paths)
|
||||||
list_delete_and_null(&route->paths);
|
list_delete(&route->paths);
|
||||||
XFREE(MTYPE_OSPF6_ROUTE, route);
|
XFREE(MTYPE_OSPF6_ROUTE, route);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,8 +158,8 @@ static struct ospf6_vertex *ospf6_vertex_create(struct ospf6_lsa *lsa)
|
||||||
|
|
||||||
static void ospf6_vertex_delete(struct ospf6_vertex *v)
|
static void ospf6_vertex_delete(struct ospf6_vertex *v)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&v->nh_list);
|
list_delete(&v->nh_list);
|
||||||
list_delete_and_null(&v->child_list);
|
list_delete(&v->child_list);
|
||||||
XFREE(MTYPE_OSPF6_VERTEX, v);
|
XFREE(MTYPE_OSPF6_VERTEX, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -202,7 +202,7 @@ void ospf6_delete(struct ospf6 *o)
|
||||||
ospf6_area_delete(oa);
|
ospf6_area_delete(oa);
|
||||||
|
|
||||||
|
|
||||||
list_delete_and_null(&o->area_list);
|
list_delete(&o->area_list);
|
||||||
|
|
||||||
ospf6_lsdb_delete(o->lsdb);
|
ospf6_lsdb_delete(o->lsdb);
|
||||||
ospf6_lsdb_delete(o->lsdb_self);
|
ospf6_lsdb_delete(o->lsdb_self);
|
||||||
|
|
|
@ -182,7 +182,7 @@ void ospf_apiserver_term(void)
|
||||||
|
|
||||||
/* Free client list itself */
|
/* Free client list itself */
|
||||||
if (apiserver_list)
|
if (apiserver_list)
|
||||||
list_delete_and_null(&apiserver_list);
|
list_delete(&apiserver_list);
|
||||||
|
|
||||||
/* Free wildcard list */
|
/* Free wildcard list */
|
||||||
/* XXX */
|
/* XXX */
|
||||||
|
|
|
@ -77,7 +77,7 @@ struct ospf_route *ospf_find_asbr_route(struct ospf *ospf,
|
||||||
|
|
||||||
/* If none is found -- look through all. */
|
/* If none is found -- look through all. */
|
||||||
if (listcount(chosen) == 0) {
|
if (listcount(chosen) == 0) {
|
||||||
list_delete_and_null(&chosen);
|
list_delete(&chosen);
|
||||||
chosen = rn->info;
|
chosen = rn->info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ struct ospf_route *ospf_find_asbr_route(struct ospf *ospf,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chosen != rn->info)
|
if (chosen != rn->info)
|
||||||
list_delete_and_null(&chosen);
|
list_delete(&chosen);
|
||||||
|
|
||||||
return best;
|
return best;
|
||||||
}
|
}
|
||||||
|
@ -775,7 +775,7 @@ void ospf_ase_external_lsas_finish(struct route_table *rt)
|
||||||
if ((lst = rn->info) != NULL) {
|
if ((lst = rn->info) != NULL) {
|
||||||
for (ALL_LIST_ELEMENTS(lst, node, nnode, lsa))
|
for (ALL_LIST_ELEMENTS(lst, node, nnode, lsa))
|
||||||
ospf_lsa_unlock(&lsa); /* external_lsas lst */
|
ospf_lsa_unlock(&lsa); /* external_lsas lst */
|
||||||
list_delete_and_null(&lst);
|
list_delete(&lst);
|
||||||
}
|
}
|
||||||
|
|
||||||
route_table_finish(rt);
|
route_table_finish(rt);
|
||||||
|
|
|
@ -185,7 +185,7 @@ void ospf_ext_term(void)
|
||||||
ospf_delete_opaque_functab(OSPF_OPAQUE_AREA_LSA,
|
ospf_delete_opaque_functab(OSPF_OPAQUE_AREA_LSA,
|
||||||
OPAQUE_TYPE_EXTENDED_LINK_LSA);
|
OPAQUE_TYPE_EXTENDED_LINK_LSA);
|
||||||
|
|
||||||
list_delete_and_null(&OspfEXT.iflist);
|
list_delete(&OspfEXT.iflist);
|
||||||
OspfEXT.scope = 0;
|
OspfEXT.scope = 0;
|
||||||
OspfEXT.enabled = false;
|
OspfEXT.enabled = false;
|
||||||
|
|
||||||
|
|
|
@ -341,10 +341,10 @@ void ospf_if_free(struct ospf_interface *oi)
|
||||||
route_table_finish(oi->ls_upd_queue);
|
route_table_finish(oi->ls_upd_queue);
|
||||||
|
|
||||||
/* Free any lists that should be freed */
|
/* Free any lists that should be freed */
|
||||||
list_delete_and_null(&oi->nbr_nbma);
|
list_delete(&oi->nbr_nbma);
|
||||||
|
|
||||||
list_delete_and_null(&oi->ls_ack);
|
list_delete(&oi->ls_ack);
|
||||||
list_delete_and_null(&oi->ls_ack_direct.ls_ack);
|
list_delete(&oi->ls_ack_direct.ls_ack);
|
||||||
|
|
||||||
if (IS_DEBUG_OSPF_EVENT)
|
if (IS_DEBUG_OSPF_EVENT)
|
||||||
zlog_debug("%s: ospf interface %s vrf %s id %u deleted",
|
zlog_debug("%s: ospf interface %s vrf %s id %u deleted",
|
||||||
|
@ -545,7 +545,7 @@ static struct ospf_if_params *ospf_new_if_params(void)
|
||||||
|
|
||||||
void ospf_del_if_params(struct ospf_if_params *oip)
|
void ospf_del_if_params(struct ospf_if_params *oip)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&oip->auth_crypt);
|
list_delete(&oip->auth_crypt);
|
||||||
bfd_info_free(&(oip->bfd_info));
|
bfd_info_free(&(oip->bfd_info));
|
||||||
XFREE(MTYPE_OSPF_IF_PARAMS, oip);
|
XFREE(MTYPE_OSPF_IF_PARAMS, oip);
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ static struct ospf_neighbor *ospf_elect_dr(struct ospf_interface *oi,
|
||||||
else
|
else
|
||||||
DR(oi).s_addr = 0;
|
DR(oi).s_addr = 0;
|
||||||
|
|
||||||
list_delete_and_null(&dr_list);
|
list_delete(&dr_list);
|
||||||
|
|
||||||
return dr;
|
return dr;
|
||||||
}
|
}
|
||||||
|
@ -144,8 +144,8 @@ static struct ospf_neighbor *ospf_elect_bdr(struct ospf_interface *oi,
|
||||||
else
|
else
|
||||||
BDR(oi).s_addr = 0;
|
BDR(oi).s_addr = 0;
|
||||||
|
|
||||||
list_delete_and_null(&bdr_list);
|
list_delete(&bdr_list);
|
||||||
list_delete_and_null(&no_dr_list);
|
list_delete(&no_dr_list);
|
||||||
|
|
||||||
return bdr;
|
return bdr;
|
||||||
}
|
}
|
||||||
|
@ -232,7 +232,7 @@ static int ospf_dr_election(struct ospf_interface *oi)
|
||||||
zlog_debug("DR-Election[2nd]: DR %s", inet_ntoa(DR(oi)));
|
zlog_debug("DR-Election[2nd]: DR %s", inet_ntoa(DR(oi)));
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(&el_list);
|
list_delete(&el_list);
|
||||||
|
|
||||||
/* if DR or BDR changes, cause AdjOK? neighbor event. */
|
/* if DR or BDR changes, cause AdjOK? neighbor event. */
|
||||||
if (!IPV4_ADDR_SAME(&old_dr, &DR(oi))
|
if (!IPV4_ADDR_SAME(&old_dr, &DR(oi))
|
||||||
|
|
|
@ -3633,7 +3633,7 @@ void ospf_refresher_unregister_lsa(struct ospf *ospf, struct ospf_lsa *lsa)
|
||||||
ospf->lsa_refresh_queue.qs[lsa->refresh_list];
|
ospf->lsa_refresh_queue.qs[lsa->refresh_list];
|
||||||
listnode_delete(refresh_list, lsa);
|
listnode_delete(refresh_list, lsa);
|
||||||
if (!listcount(refresh_list)) {
|
if (!listcount(refresh_list)) {
|
||||||
list_delete_and_null(&refresh_list);
|
list_delete(&refresh_list);
|
||||||
ospf->lsa_refresh_queue.qs[lsa->refresh_list] = NULL;
|
ospf->lsa_refresh_queue.qs[lsa->refresh_list] = NULL;
|
||||||
}
|
}
|
||||||
ospf_lsa_unlock(&lsa); /* lsa_refresh_queue */
|
ospf_lsa_unlock(&lsa); /* lsa_refresh_queue */
|
||||||
|
@ -3702,7 +3702,7 @@ int ospf_lsa_refresh_walker(struct thread *t)
|
||||||
lsa->refresh_list = -1;
|
lsa->refresh_list = -1;
|
||||||
listnode_add(lsa_to_refresh, lsa);
|
listnode_add(lsa_to_refresh, lsa);
|
||||||
}
|
}
|
||||||
list_delete_and_null(&refresh_list);
|
list_delete(&refresh_list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3718,7 +3718,7 @@ int ospf_lsa_refresh_walker(struct thread *t)
|
||||||
&lsa); /* lsa_refresh_queue & temp for lsa_to_refresh*/
|
&lsa); /* lsa_refresh_queue & temp for lsa_to_refresh*/
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(&lsa_to_refresh);
|
list_delete(&lsa_to_refresh);
|
||||||
|
|
||||||
if (IS_DEBUG_OSPF(lsa, LSA_REFRESH))
|
if (IS_DEBUG_OSPF(lsa, LSA_REFRESH))
|
||||||
zlog_debug("LSA[Refresh]: ospf_lsa_refresh_walker(): end");
|
zlog_debug("LSA[Refresh]: ospf_lsa_refresh_walker(): end");
|
||||||
|
|
|
@ -136,7 +136,7 @@ void ospf_opaque_finish(void)
|
||||||
int ospf_opaque_type9_lsa_init(struct ospf_interface *oi)
|
int ospf_opaque_type9_lsa_init(struct ospf_interface *oi)
|
||||||
{
|
{
|
||||||
if (oi->opaque_lsa_self != NULL)
|
if (oi->opaque_lsa_self != NULL)
|
||||||
list_delete_and_null(&oi->opaque_lsa_self);
|
list_delete(&oi->opaque_lsa_self);
|
||||||
|
|
||||||
oi->opaque_lsa_self = list_new();
|
oi->opaque_lsa_self = list_new();
|
||||||
oi->opaque_lsa_self->del = free_opaque_info_per_type;
|
oi->opaque_lsa_self->del = free_opaque_info_per_type;
|
||||||
|
@ -148,7 +148,7 @@ void ospf_opaque_type9_lsa_term(struct ospf_interface *oi)
|
||||||
{
|
{
|
||||||
OSPF_TIMER_OFF(oi->t_opaque_lsa_self);
|
OSPF_TIMER_OFF(oi->t_opaque_lsa_self);
|
||||||
if (oi->opaque_lsa_self != NULL)
|
if (oi->opaque_lsa_self != NULL)
|
||||||
list_delete_and_null(&oi->opaque_lsa_self);
|
list_delete(&oi->opaque_lsa_self);
|
||||||
oi->opaque_lsa_self = NULL;
|
oi->opaque_lsa_self = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ void ospf_opaque_type9_lsa_term(struct ospf_interface *oi)
|
||||||
int ospf_opaque_type10_lsa_init(struct ospf_area *area)
|
int ospf_opaque_type10_lsa_init(struct ospf_area *area)
|
||||||
{
|
{
|
||||||
if (area->opaque_lsa_self != NULL)
|
if (area->opaque_lsa_self != NULL)
|
||||||
list_delete_and_null(&area->opaque_lsa_self);
|
list_delete(&area->opaque_lsa_self);
|
||||||
|
|
||||||
area->opaque_lsa_self = list_new();
|
area->opaque_lsa_self = list_new();
|
||||||
area->opaque_lsa_self->del = free_opaque_info_per_type;
|
area->opaque_lsa_self->del = free_opaque_info_per_type;
|
||||||
|
@ -177,14 +177,14 @@ void ospf_opaque_type10_lsa_term(struct ospf_area *area)
|
||||||
|
|
||||||
OSPF_TIMER_OFF(area->t_opaque_lsa_self);
|
OSPF_TIMER_OFF(area->t_opaque_lsa_self);
|
||||||
if (area->opaque_lsa_self != NULL)
|
if (area->opaque_lsa_self != NULL)
|
||||||
list_delete_and_null(&area->opaque_lsa_self);
|
list_delete(&area->opaque_lsa_self);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ospf_opaque_type11_lsa_init(struct ospf *top)
|
int ospf_opaque_type11_lsa_init(struct ospf *top)
|
||||||
{
|
{
|
||||||
if (top->opaque_lsa_self != NULL)
|
if (top->opaque_lsa_self != NULL)
|
||||||
list_delete_and_null(&top->opaque_lsa_self);
|
list_delete(&top->opaque_lsa_self);
|
||||||
|
|
||||||
top->opaque_lsa_self = list_new();
|
top->opaque_lsa_self = list_new();
|
||||||
top->opaque_lsa_self->del = free_opaque_info_per_type;
|
top->opaque_lsa_self->del = free_opaque_info_per_type;
|
||||||
|
@ -205,7 +205,7 @@ void ospf_opaque_type11_lsa_term(struct ospf *top)
|
||||||
|
|
||||||
OSPF_TIMER_OFF(top->t_opaque_lsa_self);
|
OSPF_TIMER_OFF(top->t_opaque_lsa_self);
|
||||||
if (top->opaque_lsa_self != NULL)
|
if (top->opaque_lsa_self != NULL)
|
||||||
list_delete_and_null(&top->opaque_lsa_self);
|
list_delete(&top->opaque_lsa_self);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,16 +314,16 @@ static void ospf_opaque_funclist_term(void)
|
||||||
struct list *funclist;
|
struct list *funclist;
|
||||||
|
|
||||||
funclist = ospf_opaque_wildcard_funclist;
|
funclist = ospf_opaque_wildcard_funclist;
|
||||||
list_delete_and_null(&funclist);
|
list_delete(&funclist);
|
||||||
|
|
||||||
funclist = ospf_opaque_type9_funclist;
|
funclist = ospf_opaque_type9_funclist;
|
||||||
list_delete_and_null(&funclist);
|
list_delete(&funclist);
|
||||||
|
|
||||||
funclist = ospf_opaque_type10_funclist;
|
funclist = ospf_opaque_type10_funclist;
|
||||||
list_delete_and_null(&funclist);
|
list_delete(&funclist);
|
||||||
|
|
||||||
funclist = ospf_opaque_type11_funclist;
|
funclist = ospf_opaque_type11_funclist;
|
||||||
list_delete_and_null(&funclist);
|
list_delete(&funclist);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -633,7 +633,7 @@ static void free_opaque_info_per_type(void *val)
|
||||||
}
|
}
|
||||||
|
|
||||||
OSPF_TIMER_OFF(oipt->t_opaque_lsa_self);
|
OSPF_TIMER_OFF(oipt->t_opaque_lsa_self);
|
||||||
list_delete_and_null(&oipt->id_list);
|
list_delete(&oipt->id_list);
|
||||||
XFREE(MTYPE_OPAQUE_INFO_PER_TYPE, oipt);
|
XFREE(MTYPE_OPAQUE_INFO_PER_TYPE, oipt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -525,7 +525,7 @@ int ospf_ls_upd_timer(struct thread *thread)
|
||||||
if (listcount(update) > 0)
|
if (listcount(update) > 0)
|
||||||
ospf_ls_upd_send(nbr, update, OSPF_SEND_PACKET_DIRECT,
|
ospf_ls_upd_send(nbr, update, OSPF_SEND_PACKET_DIRECT,
|
||||||
0);
|
0);
|
||||||
list_delete_and_null(&update);
|
list_delete(&update);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set LS Update retransmission timer. */
|
/* Set LS Update retransmission timer. */
|
||||||
|
@ -1620,7 +1620,7 @@ static void ospf_ls_req(struct ip *iph, struct ospf_header *ospfh,
|
||||||
/* Verify LSA type. */
|
/* Verify LSA type. */
|
||||||
if (ls_type < OSPF_MIN_LSA || ls_type >= OSPF_MAX_LSA) {
|
if (ls_type < OSPF_MIN_LSA || ls_type >= OSPF_MAX_LSA) {
|
||||||
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_BadLSReq);
|
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_BadLSReq);
|
||||||
list_delete_and_null(&ls_upd);
|
list_delete(&ls_upd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1629,7 +1629,7 @@ static void ospf_ls_req(struct ip *iph, struct ospf_header *ospfh,
|
||||||
adv_router);
|
adv_router);
|
||||||
if (find == NULL) {
|
if (find == NULL) {
|
||||||
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_BadLSReq);
|
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_BadLSReq);
|
||||||
list_delete_and_null(&ls_upd);
|
list_delete(&ls_upd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1664,9 +1664,9 @@ static void ospf_ls_req(struct ip *iph, struct ospf_header *ospfh,
|
||||||
ospf_ls_upd_send(nbr, ls_upd, OSPF_SEND_PACKET_INDIRECT,
|
ospf_ls_upd_send(nbr, ls_upd, OSPF_SEND_PACKET_INDIRECT,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
list_delete_and_null(&ls_upd);
|
list_delete(&ls_upd);
|
||||||
} else
|
} else
|
||||||
list_delete_and_null(&ls_upd);
|
list_delete(&ls_upd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the list of LSAs from Link State Update packet.
|
/* Get the list of LSAs from Link State Update packet.
|
||||||
|
@ -1811,7 +1811,7 @@ static void ospf_upd_list_clean(struct list *lsas)
|
||||||
for (ALL_LIST_ELEMENTS(lsas, node, nnode, lsa))
|
for (ALL_LIST_ELEMENTS(lsas, node, nnode, lsa))
|
||||||
ospf_lsa_discard(lsa);
|
ospf_lsa_discard(lsa);
|
||||||
|
|
||||||
list_delete_and_null(&lsas);
|
list_delete(&lsas);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* OSPF Link State Update message read -- RFC2328 Section 13. */
|
/* OSPF Link State Update message read -- RFC2328 Section 13. */
|
||||||
|
@ -2215,7 +2215,7 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
|
||||||
#undef DISCARD_LSA
|
#undef DISCARD_LSA
|
||||||
|
|
||||||
assert(listcount(lsas) == 0);
|
assert(listcount(lsas) == 0);
|
||||||
list_delete_and_null(&lsas);
|
list_delete(&lsas);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* OSPF Link State Acknowledgment message read -- RFC2328 Section 13.7. */
|
/* OSPF Link State Acknowledgment message read -- RFC2328 Section 13.7. */
|
||||||
|
@ -3855,7 +3855,7 @@ void ospf_ls_upd_send_lsa(struct ospf_neighbor *nbr, struct ospf_lsa *lsa,
|
||||||
else
|
else
|
||||||
ospf_ls_upd_send(nbr, update, flag, 0);
|
ospf_ls_upd_send(nbr, update, flag, 0);
|
||||||
|
|
||||||
list_delete_and_null(&update);
|
list_delete(&update);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Determine size for packet. Must be at least big enough to accomodate next
|
/* Determine size for packet. Must be at least big enough to accomodate next
|
||||||
|
@ -4016,7 +4016,7 @@ static int ospf_ls_upd_send_queue_event(struct thread *thread)
|
||||||
|
|
||||||
/* list might not be empty. */
|
/* list might not be empty. */
|
||||||
if (listcount(update) == 0) {
|
if (listcount(update) == 0) {
|
||||||
list_delete_and_null((struct list **)&rn->info);
|
list_delete((struct list **)&rn->info);
|
||||||
route_unlock_node(rn);
|
route_unlock_node(rn);
|
||||||
} else
|
} else
|
||||||
again = 1;
|
again = 1;
|
||||||
|
|
|
@ -217,8 +217,8 @@ static int ospf_router_info_unregister()
|
||||||
void ospf_router_info_term(void)
|
void ospf_router_info_term(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
list_delete_and_null(&OspfRI.pce_info.pce_domain);
|
list_delete(&OspfRI.pce_info.pce_domain);
|
||||||
list_delete_and_null(&OspfRI.pce_info.pce_neighbor);
|
list_delete(&OspfRI.pce_info.pce_neighbor);
|
||||||
|
|
||||||
OspfRI.enabled = false;
|
OspfRI.enabled = false;
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ struct ospf_route *ospf_route_new()
|
||||||
void ospf_route_free(struct ospf_route * or)
|
void ospf_route_free(struct ospf_route * or)
|
||||||
{
|
{
|
||||||
if (or->paths)
|
if (or->paths)
|
||||||
list_delete_and_null(& or->paths);
|
list_delete(& or->paths);
|
||||||
|
|
||||||
XFREE(MTYPE_OSPF_ROUTE, or);
|
XFREE(MTYPE_OSPF_ROUTE, or);
|
||||||
}
|
}
|
||||||
|
@ -905,7 +905,7 @@ void ospf_prune_unreachable_routers(struct route_table *rtrs)
|
||||||
zlog_debug("Pruning router node %s",
|
zlog_debug("Pruning router node %s",
|
||||||
inet_ntoa(rn->p.u.prefix4));
|
inet_ntoa(rn->p.u.prefix4));
|
||||||
|
|
||||||
list_delete_and_null(&paths);
|
list_delete(&paths);
|
||||||
rn->info = NULL;
|
rn->info = NULL;
|
||||||
route_unlock_node(rn);
|
route_unlock_node(rn);
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,10 +209,10 @@ static void ospf_vertex_free(void *data)
|
||||||
// assert (listcount (v->parents) == 0);
|
// assert (listcount (v->parents) == 0);
|
||||||
|
|
||||||
if (v->children)
|
if (v->children)
|
||||||
list_delete_and_null(&v->children);
|
list_delete(&v->children);
|
||||||
|
|
||||||
if (v->parents)
|
if (v->parents)
|
||||||
list_delete_and_null(&v->parents);
|
list_delete(&v->parents);
|
||||||
|
|
||||||
v->lsa = NULL;
|
v->lsa = NULL;
|
||||||
|
|
||||||
|
@ -1086,7 +1086,7 @@ void ospf_rtrs_free(struct route_table *rtrs)
|
||||||
for (ALL_LIST_ELEMENTS(or_list, node, nnode, or))
|
for (ALL_LIST_ELEMENTS(or_list, node, nnode, or))
|
||||||
ospf_route_free(or);
|
ospf_route_free(or);
|
||||||
|
|
||||||
list_delete_and_null(&or_list);
|
list_delete(&or_list);
|
||||||
|
|
||||||
/* Unlock the node. */
|
/* Unlock the node. */
|
||||||
rn->info = NULL;
|
rn->info = NULL;
|
||||||
|
|
|
@ -165,10 +165,10 @@ static void sr_node_del(struct sr_node *srn)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Clean Extended Link */
|
/* Clean Extended Link */
|
||||||
list_delete_and_null(&srn->ext_link);
|
list_delete(&srn->ext_link);
|
||||||
|
|
||||||
/* Clean Prefix List */
|
/* Clean Prefix List */
|
||||||
list_delete_and_null(&srn->ext_prefix);
|
list_delete(&srn->ext_prefix);
|
||||||
|
|
||||||
XFREE(MTYPE_OSPF_SR_PARAMS, srn);
|
XFREE(MTYPE_OSPF_SR_PARAMS, srn);
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ static void ospf_sr_stop(void)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remove all SR Nodes from the Hash table. Prefix and Link SID will
|
* Remove all SR Nodes from the Hash table. Prefix and Link SID will
|
||||||
* be remove though list_delete_and_null() call. See sr_node_del()
|
* be remove though list_delete() call. See sr_node_del()
|
||||||
*/
|
*/
|
||||||
hash_clean(OspfSR.neighbors, (void *)sr_node_del);
|
hash_clean(OspfSR.neighbors, (void *)sr_node_del);
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ static int ospf_mpls_te_unregister()
|
||||||
|
|
||||||
void ospf_mpls_te_term(void)
|
void ospf_mpls_te_term(void)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&OspfMplsTE.iflist);
|
list_delete(&OspfMplsTE.iflist);
|
||||||
|
|
||||||
ospf_delete_opaque_functab(OSPF_OPAQUE_AREA_LSA,
|
ospf_delete_opaque_functab(OSPF_OPAQUE_AREA_LSA,
|
||||||
OPAQUE_TYPE_TRAFFIC_ENGINEERING_LSA);
|
OPAQUE_TYPE_TRAFFIC_ENGINEERING_LSA);
|
||||||
|
|
|
@ -583,7 +583,7 @@ void ospf_external_del(struct ospf *ospf, uint8_t type, unsigned short instance)
|
||||||
listnode_delete(ospf->external[type], ext);
|
listnode_delete(ospf->external[type], ext);
|
||||||
|
|
||||||
if (!ospf->external[type]->count)
|
if (!ospf->external[type]->count)
|
||||||
list_delete_and_null(&ospf->external[type]);
|
list_delete(&ospf->external[type]);
|
||||||
|
|
||||||
XFREE(MTYPE_OSPF_EXTERNAL, ext);
|
XFREE(MTYPE_OSPF_EXTERNAL, ext);
|
||||||
}
|
}
|
||||||
|
@ -641,7 +641,7 @@ void ospf_redist_del(struct ospf *ospf, uint8_t type, unsigned short instance)
|
||||||
if (red) {
|
if (red) {
|
||||||
listnode_delete(ospf->redist[type], red);
|
listnode_delete(ospf->redist[type], red);
|
||||||
if (!ospf->redist[type]->count) {
|
if (!ospf->redist[type]->count) {
|
||||||
list_delete_and_null(&ospf->redist[type]);
|
list_delete(&ospf->redist[type]);
|
||||||
}
|
}
|
||||||
ospf_routemap_unset(red);
|
ospf_routemap_unset(red);
|
||||||
XFREE(MTYPE_OSPF_REDISTRIBUTE, red);
|
XFREE(MTYPE_OSPF_REDISTRIBUTE, red);
|
||||||
|
|
|
@ -635,7 +635,7 @@ static void ospf_finish_final(struct ospf *ospf)
|
||||||
for (ALL_LIST_ELEMENTS(ospf->vlinks, node, nnode, vl_data))
|
for (ALL_LIST_ELEMENTS(ospf->vlinks, node, nnode, vl_data))
|
||||||
ospf_vl_delete(ospf, vl_data);
|
ospf_vl_delete(ospf, vl_data);
|
||||||
|
|
||||||
list_delete_and_null(&ospf->vlinks);
|
list_delete(&ospf->vlinks);
|
||||||
|
|
||||||
/* Remove any ospf interface config params */
|
/* Remove any ospf interface config params */
|
||||||
FOR_ALL_INTERFACES (vrf, ifp) {
|
FOR_ALL_INTERFACES (vrf, ifp) {
|
||||||
|
@ -649,7 +649,7 @@ static void ospf_finish_final(struct ospf *ospf)
|
||||||
/* Reset interface. */
|
/* Reset interface. */
|
||||||
for (ALL_LIST_ELEMENTS(ospf->oiflist, node, nnode, oi))
|
for (ALL_LIST_ELEMENTS(ospf->oiflist, node, nnode, oi))
|
||||||
ospf_if_free(oi);
|
ospf_if_free(oi);
|
||||||
list_delete_and_null(&ospf->oiflist);
|
list_delete(&ospf->oiflist);
|
||||||
|
|
||||||
/* De-Register VRF */
|
/* De-Register VRF */
|
||||||
ospf_zebra_vrf_deregister(ospf);
|
ospf_zebra_vrf_deregister(ospf);
|
||||||
|
@ -749,8 +749,8 @@ static void ospf_finish_final(struct ospf *ospf)
|
||||||
ospf_ase_external_lsas_finish(ospf->external_lsas);
|
ospf_ase_external_lsas_finish(ospf->external_lsas);
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(&ospf->areas);
|
list_delete(&ospf->areas);
|
||||||
list_delete_and_null(&ospf->oi_write_q);
|
list_delete(&ospf->oi_write_q);
|
||||||
|
|
||||||
for (i = ZEBRA_ROUTE_SYSTEM; i <= ZEBRA_ROUTE_MAX; i++) {
|
for (i = ZEBRA_ROUTE_SYSTEM; i <= ZEBRA_ROUTE_MAX; i++) {
|
||||||
struct list *ext_list;
|
struct list *ext_list;
|
||||||
|
@ -866,7 +866,7 @@ static void ospf_area_free(struct ospf_area *area)
|
||||||
ospf_lsa_unlock(&area->router_lsa_self);
|
ospf_lsa_unlock(&area->router_lsa_self);
|
||||||
|
|
||||||
route_table_finish(area->ranges);
|
route_table_finish(area->ranges);
|
||||||
list_delete_and_null(&area->oiflist);
|
list_delete(&area->oiflist);
|
||||||
|
|
||||||
if (EXPORT_NAME(area))
|
if (EXPORT_NAME(area))
|
||||||
free(EXPORT_NAME(area));
|
free(EXPORT_NAME(area));
|
||||||
|
@ -1297,7 +1297,7 @@ void ospf_ls_upd_queue_empty(struct ospf_interface *oi)
|
||||||
if ((lst = (struct list *)rn->info)) {
|
if ((lst = (struct list *)rn->info)) {
|
||||||
for (ALL_LIST_ELEMENTS(lst, node, nnode, lsa))
|
for (ALL_LIST_ELEMENTS(lst, node, nnode, lsa))
|
||||||
ospf_lsa_unlock(&lsa); /* oi->ls_upd_queue */
|
ospf_lsa_unlock(&lsa); /* oi->ls_upd_queue */
|
||||||
list_delete_and_null(&lst);
|
list_delete(&lst);
|
||||||
rn->info = NULL;
|
rn->info = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ static void tlv_trace_list(const char *label, const char *tlv_name,
|
||||||
|
|
||||||
#define FREE_ADDR_LIST \
|
#define FREE_ADDR_LIST \
|
||||||
if (hello_option_addr_list) { \
|
if (hello_option_addr_list) { \
|
||||||
list_delete_and_null(&hello_option_addr_list); \
|
list_delete(&hello_option_addr_list); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FREE_ADDR_LIST_THEN_RETURN(code) \
|
#define FREE_ADDR_LIST_THEN_RETURN(code) \
|
||||||
|
|
|
@ -201,10 +201,10 @@ void pim_if_delete(struct interface *ifp)
|
||||||
|
|
||||||
pim_if_del_vif(ifp);
|
pim_if_del_vif(ifp);
|
||||||
|
|
||||||
list_delete_and_null(&pim_ifp->igmp_socket_list);
|
list_delete(&pim_ifp->igmp_socket_list);
|
||||||
list_delete_and_null(&pim_ifp->pim_neighbor_list);
|
list_delete(&pim_ifp->pim_neighbor_list);
|
||||||
list_delete_and_null(&pim_ifp->upstream_switch_list);
|
list_delete(&pim_ifp->upstream_switch_list);
|
||||||
list_delete_and_null(&pim_ifp->sec_addr_list);
|
list_delete(&pim_ifp->sec_addr_list);
|
||||||
|
|
||||||
if (pim_ifp->boundary_oil_plist)
|
if (pim_ifp->boundary_oil_plist)
|
||||||
XFREE(MTYPE_PIM_INTERFACE, pim_ifp->boundary_oil_plist);
|
XFREE(MTYPE_PIM_INTERFACE, pim_ifp->boundary_oil_plist);
|
||||||
|
@ -1349,7 +1349,7 @@ int pim_if_igmp_join_del(struct interface *ifp, struct in_addr group_addr,
|
||||||
listnode_delete(pim_ifp->igmp_join_list, ij);
|
listnode_delete(pim_ifp->igmp_join_list, ij);
|
||||||
igmp_join_free(ij);
|
igmp_join_free(ij);
|
||||||
if (listcount(pim_ifp->igmp_join_list) < 1) {
|
if (listcount(pim_ifp->igmp_join_list) < 1) {
|
||||||
list_delete_and_null(&pim_ifp->igmp_join_list);
|
list_delete(&pim_ifp->igmp_join_list);
|
||||||
pim_ifp->igmp_join_list = 0;
|
pim_ifp->igmp_join_list = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch)
|
||||||
pim_ifchannel_remove_children(ch);
|
pim_ifchannel_remove_children(ch);
|
||||||
|
|
||||||
if (ch->sources)
|
if (ch->sources)
|
||||||
list_delete_and_null(&ch->sources);
|
list_delete(&ch->sources);
|
||||||
|
|
||||||
listnode_delete(ch->upstream->ifchannels, ch);
|
listnode_delete(ch->upstream->ifchannels, ch);
|
||||||
|
|
||||||
|
|
|
@ -736,7 +736,7 @@ void igmp_startup_mode_on(struct igmp_sock *igmp)
|
||||||
|
|
||||||
static void igmp_group_free(struct igmp_group *group)
|
static void igmp_group_free(struct igmp_group *group)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&group->group_source_list);
|
list_delete(&group->group_source_list);
|
||||||
|
|
||||||
XFREE(MTYPE_PIM_IGMP_GROUP, group);
|
XFREE(MTYPE_PIM_IGMP_GROUP, group);
|
||||||
}
|
}
|
||||||
|
@ -788,7 +788,7 @@ void igmp_sock_free(struct igmp_sock *igmp)
|
||||||
zassert(igmp->igmp_group_list);
|
zassert(igmp->igmp_group_list);
|
||||||
zassert(!listcount(igmp->igmp_group_list));
|
zassert(!listcount(igmp->igmp_group_list));
|
||||||
|
|
||||||
list_delete_and_null(&igmp->igmp_group_list);
|
list_delete(&igmp->igmp_group_list);
|
||||||
hash_free(igmp->igmp_group_hash);
|
hash_free(igmp->igmp_group_hash);
|
||||||
|
|
||||||
XFREE(MTYPE_PIM_IGMP_SOCKET, igmp);
|
XFREE(MTYPE_PIM_IGMP_SOCKET, igmp);
|
||||||
|
|
|
@ -42,7 +42,7 @@ static void pim_instance_terminate(struct pim_instance *pim)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pim->static_routes)
|
if (pim->static_routes)
|
||||||
list_delete_and_null(&pim->static_routes);
|
list_delete(&pim->static_routes);
|
||||||
|
|
||||||
pim_upstream_terminate(pim);
|
pim_upstream_terminate(pim);
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
void pim_jp_agg_group_list_free(struct pim_jp_agg_group *jag)
|
void pim_jp_agg_group_list_free(struct pim_jp_agg_group *jag)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&jag->sources);
|
list_delete(&jag->sources);
|
||||||
|
|
||||||
XFREE(MTYPE_PIM_JP_AGG_GROUP, jag);
|
XFREE(MTYPE_PIM_JP_AGG_GROUP, jag);
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ void pim_jp_agg_clear_group(struct list *group)
|
||||||
js->up = NULL;
|
js->up = NULL;
|
||||||
XFREE(MTYPE_PIM_JP_AGG_SOURCE, js);
|
XFREE(MTYPE_PIM_JP_AGG_SOURCE, js);
|
||||||
}
|
}
|
||||||
list_delete_and_null(&jag->sources);
|
list_delete(&jag->sources);
|
||||||
listnode_delete(group, jag);
|
listnode_delete(group, jag);
|
||||||
XFREE(MTYPE_PIM_JP_AGG_GROUP, jag);
|
XFREE(MTYPE_PIM_JP_AGG_GROUP, jag);
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,7 @@ void pim_jp_agg_remove_group(struct list *group, struct pim_upstream *up)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jag->sources->count == 0) {
|
if (jag->sources->count == 0) {
|
||||||
list_delete_and_null(&jag->sources);
|
list_delete(&jag->sources);
|
||||||
listnode_delete(group, jag);
|
listnode_delete(group, jag);
|
||||||
XFREE(MTYPE_PIM_JP_AGG_GROUP, jag);
|
XFREE(MTYPE_PIM_JP_AGG_GROUP, jag);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1260,7 +1260,7 @@ static void pim_msdp_mg_free(struct pim_instance *pim)
|
||||||
XFREE(MTYPE_PIM_MSDP_MG_NAME, mg->mesh_group_name);
|
XFREE(MTYPE_PIM_MSDP_MG_NAME, mg->mesh_group_name);
|
||||||
|
|
||||||
if (mg->mbr_list)
|
if (mg->mbr_list)
|
||||||
list_delete_and_null(&mg->mbr_list);
|
list_delete(&mg->mbr_list);
|
||||||
|
|
||||||
XFREE(MTYPE_PIM_MSDP_MG, pim->msdp.mg);
|
XFREE(MTYPE_PIM_MSDP_MG, pim->msdp.mg);
|
||||||
}
|
}
|
||||||
|
@ -1610,7 +1610,7 @@ void pim_msdp_exit(struct pim_instance *pim)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pim->msdp.peer_list) {
|
if (pim->msdp.peer_list) {
|
||||||
list_delete_and_null(&pim->msdp.peer_list);
|
list_delete(&pim->msdp.peer_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pim->msdp.sa_hash) {
|
if (pim->msdp.sa_hash) {
|
||||||
|
@ -1620,7 +1620,7 @@ void pim_msdp_exit(struct pim_instance *pim)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pim->msdp.sa_list) {
|
if (pim->msdp.sa_list) {
|
||||||
list_delete_and_null(&pim->msdp.sa_list);
|
list_delete(&pim->msdp.sa_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pim->msdp.work_obuf)
|
if (pim->msdp.work_obuf)
|
||||||
|
|
|
@ -397,7 +397,7 @@ static void delete_prefix_list(struct pim_neighbor *neigh)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
list_delete_and_null(&neigh->prefix_list);
|
list_delete(&neigh->prefix_list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -407,7 +407,7 @@ void pim_neighbor_free(struct pim_neighbor *neigh)
|
||||||
|
|
||||||
delete_prefix_list(neigh);
|
delete_prefix_list(neigh);
|
||||||
|
|
||||||
list_delete_and_null(&neigh->upstream_jp_agg);
|
list_delete(&neigh->upstream_jp_agg);
|
||||||
THREAD_OFF(neigh->jp_timer);
|
THREAD_OFF(neigh->jp_timer);
|
||||||
|
|
||||||
if (neigh->bfd_info)
|
if (neigh->bfd_info)
|
||||||
|
|
|
@ -196,7 +196,7 @@ void pim_delete_tracked_nexthop(struct pim_instance *pim, struct prefix *addr,
|
||||||
pim_sendmsg_zebra_rnh(pim, zclient, pnc,
|
pim_sendmsg_zebra_rnh(pim, zclient, pnc,
|
||||||
ZEBRA_NEXTHOP_UNREGISTER);
|
ZEBRA_NEXTHOP_UNREGISTER);
|
||||||
|
|
||||||
list_delete_and_null(&pnc->rp_list);
|
list_delete(&pnc->rp_list);
|
||||||
hash_free(pnc->upstream_hash);
|
hash_free(pnc->upstream_hash);
|
||||||
|
|
||||||
hash_release(pim->rpf_hash, pnc);
|
hash_release(pim->rpf_hash, pnc);
|
||||||
|
|
|
@ -116,7 +116,7 @@ void pim_oil_init(struct pim_instance *pim)
|
||||||
void pim_oil_terminate(struct pim_instance *pim)
|
void pim_oil_terminate(struct pim_instance *pim)
|
||||||
{
|
{
|
||||||
if (pim->channel_oil_list)
|
if (pim->channel_oil_list)
|
||||||
list_delete_and_null(&pim->channel_oil_list);
|
list_delete(&pim->channel_oil_list);
|
||||||
|
|
||||||
if (pim->channel_oil_hash)
|
if (pim->channel_oil_hash)
|
||||||
hash_free(pim->channel_oil_hash);
|
hash_free(pim->channel_oil_hash);
|
||||||
|
|
|
@ -52,7 +52,7 @@ void pim_rp_list_hash_clean(void *data)
|
||||||
{
|
{
|
||||||
struct pim_nexthop_cache *pnc = (struct pim_nexthop_cache *)data;
|
struct pim_nexthop_cache *pnc = (struct pim_nexthop_cache *)data;
|
||||||
|
|
||||||
list_delete_and_null(&pnc->rp_list);
|
list_delete(&pnc->rp_list);
|
||||||
|
|
||||||
hash_clean(pnc->upstream_hash, NULL);
|
hash_clean(pnc->upstream_hash, NULL);
|
||||||
hash_free(pnc->upstream_hash);
|
hash_free(pnc->upstream_hash);
|
||||||
|
@ -115,7 +115,7 @@ void pim_rp_init(struct pim_instance *pim)
|
||||||
if (!str2prefix("224.0.0.0/4", &rp_info->group)) {
|
if (!str2prefix("224.0.0.0/4", &rp_info->group)) {
|
||||||
flog_err(EC_LIB_DEVELOPMENT,
|
flog_err(EC_LIB_DEVELOPMENT,
|
||||||
"Unable to convert 224.0.0.0/4 to prefix");
|
"Unable to convert 224.0.0.0/4 to prefix");
|
||||||
list_delete_and_null(&pim->rp_list);
|
list_delete(&pim->rp_list);
|
||||||
route_table_finish(pim->rp_table);
|
route_table_finish(pim->rp_table);
|
||||||
XFREE(MTYPE_PIM_RP, rp_info);
|
XFREE(MTYPE_PIM_RP, rp_info);
|
||||||
return;
|
return;
|
||||||
|
@ -138,7 +138,7 @@ void pim_rp_init(struct pim_instance *pim)
|
||||||
void pim_rp_free(struct pim_instance *pim)
|
void pim_rp_free(struct pim_instance *pim)
|
||||||
{
|
{
|
||||||
if (pim->rp_list)
|
if (pim->rp_list)
|
||||||
list_delete_and_null(&pim->rp_list);
|
list_delete(&pim->rp_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -52,7 +52,7 @@ void pim_ssmpingd_init(struct pim_instance *pim)
|
||||||
void pim_ssmpingd_destroy(struct pim_instance *pim)
|
void pim_ssmpingd_destroy(struct pim_instance *pim)
|
||||||
{
|
{
|
||||||
if (pim->ssmpingd_list)
|
if (pim->ssmpingd_list)
|
||||||
list_delete_and_null(&pim->ssmpingd_list);
|
list_delete(&pim->ssmpingd_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ssmpingd_sock *ssmpingd_find(struct pim_instance *pim,
|
static struct ssmpingd_sock *ssmpingd_find(struct pim_instance *pim,
|
||||||
|
|
|
@ -657,7 +657,7 @@ int pim_parse_addr_source(struct prefix_sg *sg, uint8_t *flags,
|
||||||
#define FREE_ADDR_LIST(hello_option_addr_list) \
|
#define FREE_ADDR_LIST(hello_option_addr_list) \
|
||||||
{ \
|
{ \
|
||||||
if (hello_option_addr_list) { \
|
if (hello_option_addr_list) { \
|
||||||
list_delete_and_null(&hello_option_addr_list); \
|
list_delete(&hello_option_addr_list); \
|
||||||
hello_option_addr_list = 0; \
|
hello_option_addr_list = 0; \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ static void pim_upstream_remove_children(struct pim_instance *pim,
|
||||||
if (child)
|
if (child)
|
||||||
child->parent = NULL;
|
child->parent = NULL;
|
||||||
}
|
}
|
||||||
list_delete_and_null(&up->sources);
|
list_delete(&up->sources);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -202,11 +202,11 @@ struct pim_upstream *pim_upstream_del(struct pim_instance *pim,
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS(up->ifchannels, node, nnode, ch))
|
for (ALL_LIST_ELEMENTS(up->ifchannels, node, nnode, ch))
|
||||||
pim_ifchannel_delete(ch);
|
pim_ifchannel_delete(ch);
|
||||||
list_delete_and_null(&up->ifchannels);
|
list_delete(&up->ifchannels);
|
||||||
|
|
||||||
pim_upstream_remove_children(pim, up);
|
pim_upstream_remove_children(pim, up);
|
||||||
if (up->sources)
|
if (up->sources)
|
||||||
list_delete_and_null(&up->sources);
|
list_delete(&up->sources);
|
||||||
|
|
||||||
if (up->parent && up->parent->sources)
|
if (up->parent && up->parent->sources)
|
||||||
listnode_delete(up->parent->sources, up);
|
listnode_delete(up->parent->sources, up);
|
||||||
|
@ -683,9 +683,9 @@ static struct pim_upstream *pim_upstream_new(struct pim_instance *pim,
|
||||||
|
|
||||||
pim_upstream_remove_children(pim, up);
|
pim_upstream_remove_children(pim, up);
|
||||||
if (up->sources)
|
if (up->sources)
|
||||||
list_delete_and_null(&up->sources);
|
list_delete(&up->sources);
|
||||||
|
|
||||||
list_delete_and_null(&up->ifchannels);
|
list_delete(&up->ifchannels);
|
||||||
|
|
||||||
hash_release(pim->upstream_hash, up);
|
hash_release(pim->upstream_hash, up);
|
||||||
XFREE(MTYPE_PIM_UPSTREAM, up);
|
XFREE(MTYPE_PIM_UPSTREAM, up);
|
||||||
|
@ -1542,7 +1542,7 @@ void pim_upstream_terminate(struct pim_instance *pim)
|
||||||
pim_upstream_del(pim, up, __PRETTY_FUNCTION__);
|
pim_upstream_del(pim, up, __PRETTY_FUNCTION__);
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(&pim->upstream_list);
|
list_delete(&pim->upstream_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pim->upstream_hash)
|
if (pim->upstream_hash)
|
||||||
|
|
|
@ -363,7 +363,7 @@ void rip_offset_init()
|
||||||
|
|
||||||
void rip_offset_clean()
|
void rip_offset_clean()
|
||||||
{
|
{
|
||||||
list_delete_and_null(&rip_offset_list_master);
|
list_delete(&rip_offset_list_master);
|
||||||
|
|
||||||
rip_offset_list_master = list_new();
|
rip_offset_list_master = list_new();
|
||||||
rip_offset_list_master->cmp = (int (*)(void *, void *))offset_list_cmp;
|
rip_offset_list_master->cmp = (int (*)(void *, void *))offset_list_cmp;
|
||||||
|
|
|
@ -131,7 +131,7 @@ static int rip_garbage_collect(struct thread *t)
|
||||||
/* Unlock route_node. */
|
/* Unlock route_node. */
|
||||||
listnode_delete(rp->info, rinfo);
|
listnode_delete(rp->info, rinfo);
|
||||||
if (list_isempty((struct list *)rp->info)) {
|
if (list_isempty((struct list *)rp->info)) {
|
||||||
list_delete_and_null((struct list **)&rp->info);
|
list_delete((struct list **)&rp->info);
|
||||||
route_unlock_node(rp);
|
route_unlock_node(rp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3832,7 +3832,7 @@ void rip_clean(void)
|
||||||
RIP_TIMER_OFF(rinfo->t_garbage_collect);
|
RIP_TIMER_OFF(rinfo->t_garbage_collect);
|
||||||
rip_info_free(rinfo);
|
rip_info_free(rinfo);
|
||||||
}
|
}
|
||||||
list_delete_and_null(&list);
|
list_delete(&list);
|
||||||
rp->info = NULL;
|
rp->info = NULL;
|
||||||
route_unlock_node(rp);
|
route_unlock_node(rp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ struct list *ripng_rte_new(void)
|
||||||
|
|
||||||
void ripng_rte_free(struct list *ripng_rte_list)
|
void ripng_rte_free(struct list *ripng_rte_list)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&ripng_rte_list);
|
list_delete(&ripng_rte_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Delete RTE */
|
/* Delete RTE */
|
||||||
|
|
|
@ -375,7 +375,7 @@ void ripng_offset_init(void)
|
||||||
|
|
||||||
void ripng_offset_clean(void)
|
void ripng_offset_clean(void)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&ripng_offset_list_master);
|
list_delete(&ripng_offset_list_master);
|
||||||
|
|
||||||
ripng_offset_list_master = list_new();
|
ripng_offset_list_master = list_new();
|
||||||
ripng_offset_list_master->cmp =
|
ripng_offset_list_master->cmp =
|
||||||
|
|
|
@ -407,7 +407,7 @@ static int ripng_garbage_collect(struct thread *t)
|
||||||
/* Unlock route_node. */
|
/* Unlock route_node. */
|
||||||
listnode_delete(rp->info, rinfo);
|
listnode_delete(rp->info, rinfo);
|
||||||
if (list_isempty((struct list *)rp->info)) {
|
if (list_isempty((struct list *)rp->info)) {
|
||||||
list_delete_and_null((struct list **)&rp->info);
|
list_delete((struct list **)&rp->info);
|
||||||
agg_unlock_node(rp);
|
agg_unlock_node(rp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2144,7 +2144,7 @@ DEFUN (clear_ipv6_rip,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list_isempty(list)) {
|
if (list_isempty(list)) {
|
||||||
list_delete_and_null(&list);
|
list_delete(&list);
|
||||||
rp->info = NULL;
|
rp->info = NULL;
|
||||||
agg_unlock_node(rp);
|
agg_unlock_node(rp);
|
||||||
}
|
}
|
||||||
|
@ -2826,7 +2826,7 @@ void ripng_clean()
|
||||||
rinfo->t_garbage_collect);
|
rinfo->t_garbage_collect);
|
||||||
ripng_info_free(rinfo);
|
ripng_info_free(rinfo);
|
||||||
}
|
}
|
||||||
list_delete_and_null(&list);
|
list_delete(&list);
|
||||||
rp->info = NULL;
|
rp->info = NULL;
|
||||||
agg_unlock_node(rp);
|
agg_unlock_node(rp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,7 @@ static void do_test(struct bgp_table *table, const char *prefix,
|
||||||
|
|
||||||
check_lookup_result(list, arglist);
|
check_lookup_result(list, arglist);
|
||||||
|
|
||||||
list_delete_and_null(&list);
|
list_delete(&list);
|
||||||
|
|
||||||
va_end(arglist);
|
va_end(arglist);
|
||||||
|
|
||||||
|
|
|
@ -966,7 +966,7 @@ static void test_finish(struct test *test)
|
||||||
test->vty = NULL;
|
test->vty = NULL;
|
||||||
}
|
}
|
||||||
if (test->log)
|
if (test->log)
|
||||||
list_delete_and_null(&test->log);
|
list_delete(&test->log);
|
||||||
if (test->desc)
|
if (test->desc)
|
||||||
XFREE(MTYPE_TMP, test->desc);
|
XFREE(MTYPE_TMP, test->desc);
|
||||||
if (test->error)
|
if (test->error)
|
||||||
|
@ -1423,7 +1423,7 @@ static void bgp_shutdown(void)
|
||||||
bgp_zebra_destroy();
|
bgp_zebra_destroy();
|
||||||
|
|
||||||
bf_free(bm->rd_idspace);
|
bf_free(bm->rd_idspace);
|
||||||
list_delete_and_null(&bm->bgp);
|
list_delete(&bm->bgp);
|
||||||
memset(bm, 0, sizeof(*bm));
|
memset(bm, 0, sizeof(*bm));
|
||||||
|
|
||||||
vty_terminate();
|
vty_terminate();
|
||||||
|
@ -1502,7 +1502,7 @@ int main(void)
|
||||||
XFREE(MTYPE_TMP, pa);
|
XFREE(MTYPE_TMP, pa);
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(&pa_list);
|
list_delete(&pa_list);
|
||||||
bgp_shutdown();
|
bgp_shutdown();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -176,7 +176,7 @@ static int test(FILE *input, FILE *output)
|
||||||
sbuf_push(&fragment_format, 0, "%s", isis_format_tlvs(tlvs));
|
sbuf_push(&fragment_format, 0, "%s", isis_format_tlvs(tlvs));
|
||||||
isis_free_tlvs(tlvs);
|
isis_free_tlvs(tlvs);
|
||||||
}
|
}
|
||||||
list_delete_and_null(&fragments);
|
list_delete(&fragments);
|
||||||
stream_free(s);
|
stream_free(s);
|
||||||
|
|
||||||
char *fragment_content = sortlines((char *)sbuf_buf(&fragment_format));
|
char *fragment_content = sortlines((char *)sbuf_buf(&fragment_format));
|
||||||
|
|
|
@ -73,7 +73,7 @@ static int config_cmp(struct config *c1, struct config *c2)
|
||||||
|
|
||||||
static void config_del(struct config *config)
|
static void config_del(struct config *config)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&config->line);
|
list_delete(&config->line);
|
||||||
if (config->name)
|
if (config->name)
|
||||||
XFREE(MTYPE_VTYSH_CONFIG_LINE, config->name);
|
XFREE(MTYPE_VTYSH_CONFIG_LINE, config->name);
|
||||||
XFREE(MTYPE_VTYSH_CONFIG, config);
|
XFREE(MTYPE_VTYSH_CONFIG, config);
|
||||||
|
@ -393,7 +393,7 @@ void vtysh_config_dump(void)
|
||||||
|
|
||||||
for (i = 0; i < vector_active(configvec); i++)
|
for (i = 0; i < vector_active(configvec); i++)
|
||||||
if ((master = vector_slot(configvec, i)) != NULL) {
|
if ((master = vector_slot(configvec, i)) != NULL) {
|
||||||
list_delete_and_null(&master);
|
list_delete(&master);
|
||||||
vector_slot(configvec, i) = NULL;
|
vector_slot(configvec, i) = NULL;
|
||||||
}
|
}
|
||||||
list_delete_all_node(config_top);
|
list_delete_all_node(config_top);
|
||||||
|
|
|
@ -88,7 +88,7 @@ static void zebra_if_node_destroy(route_table_delegate_t *delegate,
|
||||||
struct route_node *node)
|
struct route_node *node)
|
||||||
{
|
{
|
||||||
if (node->info)
|
if (node->info)
|
||||||
list_delete_and_null((struct list **)&node->info);
|
list_delete((struct list **)&node->info);
|
||||||
route_node_destroy(delegate, table, node);
|
route_node_destroy(delegate, table, node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ static int if_zebra_delete_hook(struct interface *ifp)
|
||||||
struct rtadvconf *rtadv;
|
struct rtadvconf *rtadv;
|
||||||
|
|
||||||
rtadv = &zebra_if->rtadv;
|
rtadv = &zebra_if->rtadv;
|
||||||
list_delete_and_null(&rtadv->AdvPrefixList);
|
list_delete(&rtadv->AdvPrefixList);
|
||||||
#endif /* HAVE_RTADV */
|
#endif /* HAVE_RTADV */
|
||||||
|
|
||||||
THREAD_OFF(zebra_if->speed_update);
|
THREAD_OFF(zebra_if->speed_update);
|
||||||
|
@ -361,7 +361,7 @@ int if_subnet_delete(struct interface *ifp, struct connected *ifc)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Otherwise, free list and route node. */
|
/* Otherwise, free list and route node. */
|
||||||
list_delete_and_null(&addr_list);
|
list_delete(&addr_list);
|
||||||
rn->info = NULL;
|
rn->info = NULL;
|
||||||
route_unlock_node(rn);
|
route_unlock_node(rn);
|
||||||
|
|
||||||
|
@ -673,7 +673,7 @@ static void if_delete_connected(struct interface *ifp)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free chain list and respective route node. */
|
/* Free chain list and respective route node. */
|
||||||
list_delete_and_null(&addr_list);
|
list_delete(&addr_list);
|
||||||
rn->info = NULL;
|
rn->info = NULL;
|
||||||
route_unlock_node(rn);
|
route_unlock_node(rn);
|
||||||
} else if (cp.family == AF_INET6) {
|
} else if (cp.family == AF_INET6) {
|
||||||
|
|
|
@ -309,7 +309,7 @@ static void irdp_if_stop(struct interface *ifp)
|
||||||
|
|
||||||
irdp_advert_off(ifp);
|
irdp_advert_off(ifp);
|
||||||
|
|
||||||
list_delete_and_null(&irdp->AdvPrefList);
|
list_delete(&irdp->AdvPrefList);
|
||||||
|
|
||||||
irdp->flags = 0;
|
irdp->flags = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -482,6 +482,6 @@ int release_label_chunk(uint8_t proto, unsigned short instance, uint32_t start,
|
||||||
|
|
||||||
void label_manager_close()
|
void label_manager_close()
|
||||||
{
|
{
|
||||||
list_delete_and_null(&lbl_mgr.lc_list);
|
list_delete(&lbl_mgr.lc_list);
|
||||||
stream_free(obuf);
|
stream_free(obuf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,7 +170,7 @@ static void sigint(void)
|
||||||
prefix_list_reset();
|
prefix_list_reset();
|
||||||
route_map_finish();
|
route_map_finish();
|
||||||
|
|
||||||
list_delete_and_null(&zebrad.client_list);
|
list_delete(&zebrad.client_list);
|
||||||
work_queue_free_and_null(&zebrad.ribq);
|
work_queue_free_and_null(&zebrad.ribq);
|
||||||
meta_queue_free(zebrad.mq);
|
meta_queue_free(zebrad.mq);
|
||||||
|
|
||||||
|
|
|
@ -237,5 +237,5 @@ void table_manager_disable(ns_id_t ns_id)
|
||||||
{
|
{
|
||||||
if (ns_id != NS_DEFAULT)
|
if (ns_id != NS_DEFAULT)
|
||||||
return;
|
return;
|
||||||
list_delete_and_null(&tbl_mgr.lc_list);
|
list_delete(&tbl_mgr.lc_list);
|
||||||
}
|
}
|
||||||
|
|
|
@ -572,7 +572,7 @@ static zebra_fec_t *fec_add(struct route_table *table, struct prefix *p,
|
||||||
*/
|
*/
|
||||||
static int fec_del(zebra_fec_t *fec)
|
static int fec_del(zebra_fec_t *fec)
|
||||||
{
|
{
|
||||||
list_delete_and_null(&fec->client_list);
|
list_delete(&fec->client_list);
|
||||||
fec->rn->info = NULL;
|
fec->rn->info = NULL;
|
||||||
route_unlock_node(fec->rn);
|
route_unlock_node(fec->rn);
|
||||||
XFREE(MTYPE_FEC, fec);
|
XFREE(MTYPE_FEC, fec);
|
||||||
|
@ -2810,7 +2810,7 @@ void zebra_mpls_print_lsp_table(struct vty *vty, struct zebra_vrf *zvrf,
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(&lsp_list);
|
list_delete(&lsp_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2849,7 +2849,7 @@ int zebra_mpls_write_lsp_config(struct vty *vty, struct zebra_vrf *zvrf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
list_delete_and_null(&slsp_list);
|
list_delete(&slsp_list);
|
||||||
return (zvrf->slsp_table->count ? 1 : 0);
|
return (zvrf->slsp_table->count ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2058,7 +2058,7 @@ void meta_queue_free(struct meta_queue *mq)
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
for (i = 0; i < MQ_SIZE; i++)
|
for (i = 0; i < MQ_SIZE; i++)
|
||||||
list_delete_and_null(&mq->subq[i]);
|
list_delete(&mq->subq[i]);
|
||||||
|
|
||||||
XFREE(MTYPE_WORK_QUEUE, mq);
|
XFREE(MTYPE_WORK_QUEUE, mq);
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,8 +171,8 @@ struct rnh *zebra_lookup_rnh(struct prefix *p, vrf_id_t vrfid, rnh_type_t type)
|
||||||
void zebra_free_rnh(struct rnh *rnh)
|
void zebra_free_rnh(struct rnh *rnh)
|
||||||
{
|
{
|
||||||
rnh->flags |= ZEBRA_NHT_DELETED;
|
rnh->flags |= ZEBRA_NHT_DELETED;
|
||||||
list_delete_and_null(&rnh->client_list);
|
list_delete(&rnh->client_list);
|
||||||
list_delete_and_null(&rnh->zebra_pseudowire_list);
|
list_delete(&rnh->zebra_pseudowire_list);
|
||||||
free_state(rnh->vrf_id, rnh->state, rnh->node);
|
free_state(rnh->vrf_id, rnh->state, rnh->node);
|
||||||
XFREE(MTYPE_RNH, rnh);
|
XFREE(MTYPE_RNH, rnh);
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue