+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* IS-IS Rout(e)ing protocol - isis_events.h
*
* Copyright (C) 2001,2002 Sampo Saaristo
* Tampere University of Technology
* Institute of Communications Engineering
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public Licenseas published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
circuit->area->area_tag, circuit->circuit_id,
circuit->interface->name, level);
- thread_cancel(&circuit->t_send_csnp[idx]);
- thread_cancel(&circuit->t_send_psnp[idx]);
+ THREAD_OFF(circuit->t_send_csnp[idx]);
+ THREAD_OFF(circuit->t_send_psnp[idx]);
if (circuit->circ_type == CIRCUIT_T_BROADCAST) {
- thread_cancel(&circuit->u.bc.t_send_lan_hello[idx]);
- thread_cancel(&circuit->u.bc.t_run_dr[idx]);
- thread_cancel(&circuit->u.bc.t_refresh_pseudo_lsp[idx]);
+ THREAD_OFF(circuit->u.bc.t_send_lan_hello[idx]);
+ THREAD_OFF(circuit->u.bc.t_run_dr[idx]);
+ THREAD_OFF(circuit->u.bc.t_refresh_pseudo_lsp[idx]);
circuit->lsp_regenerate_pending[idx] = 0;
circuit->u.bc.run_dr_elect[idx] = 0;
circuit->u.bc.is_dr[idx] = 0;
void isis_circuit_is_type_set(struct isis_circuit *circuit, int newtype)
{
- if (circuit->state != C_STATE_UP) {
+ if (!circuit->area) {
circuit->is_type = newtype;
return;
}
return;
}
+ if (circuit->state != C_STATE_UP) {
+ circuit->is_type = newtype;
+ return;
+ }
+
if (!circuit->is_passive) {
switch (circuit->is_type) {
case IS_LEVEL_1:
/* events supporting code */
-int isis_event_dis_status_change(struct thread *thread)
+void isis_event_dis_status_change(struct thread *thread)
{
struct isis_circuit *circuit;
/* invalid arguments */
if (!circuit || !circuit->area)
- return 0;
+ return;
if (IS_DEBUG_EVENTS)
zlog_debug("ISIS-Evt (%s) DIS status change",
circuit->area->area_tag);
/* LSP generation again */
lsp_regenerate_schedule(circuit->area, IS_LEVEL_1 | IS_LEVEL_2, 0);
-
- return 0;
}
void isis_event_auth_failure(char *area_tag, const char *error_string,