static int isis_zebra_if_del (int command, struct zclient *zclient, zebra_size_t length) { struct interface *ifp; struct stream *s; s = zclient->ibuf; ifp = zebra_interface_state_read (s); if (!ifp) return 0; if (if_is_operative (ifp)) zlog_warn ("Zebra: got delete of %s, but interface is still up", ifp->name); if (isis->debugs & DEBUG_ZEBRA) zlog_debug ("Zebra I/F delete: %s index %d flags %ld metric %d mtu %d", ifp->name, ifp->ifindex, (long)ifp->flags, ifp->metric, ifp->mtu); /* Cannot call if_delete because we should retain the pseudo interface in case there is configuration info attached to it. */ if_delete_retain(ifp); isis_csm_state_change (IF_DOWN_FROM_Z, circuit_scan_by_ifp (ifp), ifp); ifp->ifindex = IFINDEX_INTERNAL; return 0; }
/* Delete and free interface structure. */ void if_delete (struct interface *ifp) { listnode_delete (iflist, ifp); if_delete_retain(ifp); XFREE (MTYPE_IF, ifp); }
/* Delete and free interface structure. */ void if_delete(struct interface *ifp) { listnode_delete(iflist, ifp); if_delete_retain(ifp); list_free(ifp->connected); XFREE(MTYPE_IF, ifp); }