]> git.proxmox.com Git - mirror_frr.git/blobdiff - isisd/isis_events.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / isisd / isis_events.c
index 26c68db762f3d1f5d4a852e4d209cc34e7d41559..d7b3969114084e1999a204d863e5aa6260e71c5b 100644 (file)
@@ -1,23 +1,10 @@
+// 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>
 
@@ -109,13 +96,13 @@ static void circuit_resign_level(struct isis_circuit *circuit, int level)
                        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;
@@ -209,7 +196,7 @@ void isis_circuit_is_type_set(struct isis_circuit *circuit, int newtype)
 
 /* 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;
 
@@ -217,15 +204,13 @@ int isis_event_dis_status_change(struct thread *thread)
 
        /* 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,