jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 1 | /* |
| 2 | * IS-IS Rout(e)ing protocol - isis_events.h |
| 3 | * |
| 4 | * Copyright (C) 2001,2002 Sampo Saaristo |
| 5 | * Tampere University of Technology |
| 6 | * Institute of Communications Engineering |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * under the terms of the GNU General Public Licenseas published by the Free |
| 10 | * Software Foundation; either version 2 of the License, or (at your option) |
| 11 | * any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful,but WITHOUT |
| 14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 16 | * more details. |
| 17 | |
| 18 | * You should have received a copy of the GNU General Public License along |
| 19 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 20 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 21 | */ |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 22 | #include <zebra.h> |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 23 | |
| 24 | #include "log.h" |
| 25 | #include "memory.h" |
| 26 | #include "if.h" |
| 27 | #include "linklist.h" |
| 28 | #include "command.h" |
| 29 | #include "thread.h" |
| 30 | #include "hash.h" |
| 31 | #include "prefix.h" |
| 32 | #include "stream.h" |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 33 | #include "table.h" |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 34 | |
| 35 | #include "isisd/dict.h" |
| 36 | #include "isisd/include-netbsd/iso.h" |
| 37 | #include "isisd/isis_constants.h" |
| 38 | #include "isisd/isis_common.h" |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 39 | #include "isisd/isis_flags.h" |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 40 | #include "isisd/isis_circuit.h" |
| 41 | #include "isisd/isis_tlv.h" |
| 42 | #include "isisd/isis_lsp.h" |
| 43 | #include "isisd/isis_pdu.h" |
| 44 | #include "isisd/isis_network.h" |
| 45 | #include "isisd/isis_misc.h" |
| 46 | #include "isisd/isis_constants.h" |
| 47 | #include "isisd/isis_adjacency.h" |
| 48 | #include "isisd/isis_dr.h" |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 49 | #include "isisd/isisd.h" |
| 50 | #include "isisd/isis_csm.h" |
| 51 | #include "isisd/isis_events.h" |
| 52 | #include "isisd/isis_spf.h" |
| 53 | |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 54 | /* debug isis-spf spf-events |
| 55 | 4w4d: ISIS-Spf (tlt): L2 SPF needed, new adjacency, from 0x609229F4 |
| 56 | 4w4d: ISIS-Spf (tlt): L2, 0000.0000.0042.01-00 TLV contents changed, code 0x2 |
| 57 | 4w4d: ISIS-Spf (tlt): L2, new LSP 0 DEAD.BEEF.0043.00-00 |
| 58 | 4w5d: ISIS-Spf (tlt): L1 SPF needed, periodic SPF, from 0x6091C844 |
| 59 | 4w5d: ISIS-Spf (tlt): L2 SPF needed, periodic SPF, from 0x6091C844 |
| 60 | */ |
| 61 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 62 | void |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 63 | isis_event_circuit_state_change (struct isis_circuit *circuit, |
| 64 | struct isis_area *area, int up) |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 65 | { |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 66 | area->circuit_state_changes++; |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 67 | |
| 68 | if (isis->debugs & DEBUG_EVENTS) |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 69 | zlog_debug ("ISIS-Evt (%s) circuit %s", area->area_tag, |
| 70 | up ? "up" : "down"); |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 71 | |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 72 | /* |
| 73 | * Regenerate LSPs this affects |
| 74 | */ |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 75 | lsp_regenerate_schedule (area, IS_LEVEL_1 | IS_LEVEL_2, 0); |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 76 | |
| 77 | return; |
| 78 | } |
| 79 | |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 80 | static void |
| 81 | area_resign_level (struct isis_area *area, int level) |
| 82 | { |
| 83 | if (area->lspdb[level - 1]) |
| 84 | { |
| 85 | lsp_db_destroy (area->lspdb[level - 1]); |
| 86 | area->lspdb[level - 1] = NULL; |
| 87 | } |
| 88 | if (area->spftree[level - 1]) |
| 89 | { |
| 90 | isis_spftree_del (area->spftree[level - 1]); |
| 91 | area->spftree[level - 1] = NULL; |
| 92 | } |
| 93 | #ifdef HAVE_IPV6 |
| 94 | if (area->spftree6[level - 1]) |
| 95 | { |
| 96 | isis_spftree_del (area->spftree6[level - 1]); |
| 97 | area->spftree6[level - 1] = NULL; |
| 98 | } |
| 99 | #endif |
| 100 | if (area->route_table[level - 1]) |
| 101 | { |
| 102 | route_table_finish (area->route_table[level - 1]); |
| 103 | area->route_table[level - 1] = NULL; |
| 104 | } |
| 105 | #ifdef HAVE_IPV6 |
| 106 | if (area->route_table6[level - 1]) |
| 107 | { |
| 108 | route_table_finish (area->route_table6[level - 1]); |
| 109 | area->route_table6[level - 1] = NULL; |
| 110 | } |
| 111 | #endif /* HAVE_IPV6 */ |
| 112 | |
| 113 | THREAD_TIMER_OFF (area->t_lsp_refresh[level - 1]); |
| 114 | } |
| 115 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 116 | void |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 117 | isis_event_system_type_change (struct isis_area *area, int newtype) |
| 118 | { |
hasso | 3fdb2dd | 2005-09-28 18:45:54 +0000 | [diff] [blame] | 119 | struct listnode *node; |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 120 | struct isis_circuit *circuit; |
| 121 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 122 | if (isis->debugs & DEBUG_EVENTS) |
hasso | 529d65b | 2004-12-24 00:14:50 +0000 | [diff] [blame] | 123 | zlog_debug ("ISIS-Evt (%s) system type change %s -> %s", area->area_tag, |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 124 | circuit_t2string (area->is_type), circuit_t2string (newtype)); |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 125 | |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 126 | if (area->is_type == newtype) |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 127 | return; /* No change */ |
| 128 | |
| 129 | switch (area->is_type) |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 130 | { |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 131 | case IS_LEVEL_1: |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 132 | if (newtype == IS_LEVEL_2) |
| 133 | { |
| 134 | area_resign_level (area, IS_LEVEL_1); |
| 135 | } |
| 136 | else |
| 137 | { |
| 138 | if (area->lspdb[1] == NULL) |
| 139 | area->lspdb[1] = lsp_db_init (); |
| 140 | if (area->route_table[1] == NULL) |
| 141 | area->route_table[1] = route_table_init (); |
| 142 | #ifdef HAVE_IPV6 |
| 143 | if (area->route_table6[1] == NULL) |
| 144 | area->route_table6[1] = route_table_init (); |
| 145 | #endif /* HAVE_IPV6 */ |
| 146 | } |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 147 | break; |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 148 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 149 | case IS_LEVEL_1_AND_2: |
| 150 | if (newtype == IS_LEVEL_1) |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 151 | area_resign_level (area, IS_LEVEL_2); |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 152 | else |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 153 | area_resign_level (area, IS_LEVEL_1); |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 154 | break; |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 155 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 156 | case IS_LEVEL_2: |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 157 | if (newtype == IS_LEVEL_1) |
| 158 | { |
| 159 | area_resign_level (area, IS_LEVEL_2); |
| 160 | } |
| 161 | else |
| 162 | { |
| 163 | if (area->lspdb[0] == NULL) |
| 164 | area->lspdb[0] = lsp_db_init (); |
| 165 | if (area->route_table[0] == NULL) |
| 166 | area->route_table[0] = route_table_init (); |
| 167 | #ifdef HAVE_IPV6 |
| 168 | if (area->route_table6[0] == NULL) |
| 169 | area->route_table6[0] = route_table_init (); |
| 170 | #endif /* HAVE_IPV6 */ |
| 171 | } |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 172 | break; |
| 173 | default: |
| 174 | break; |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 175 | } |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 176 | |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 177 | area->is_type = newtype; |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 178 | |
| 179 | /* override circuit's is_type */ |
| 180 | if (area->is_type != IS_LEVEL_1_AND_2) |
| 181 | { |
| 182 | for (ALL_LIST_ELEMENTS_RO (area->circuit_list, node, circuit)) |
| 183 | isis_event_circuit_type_change (circuit, newtype); |
| 184 | } |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 185 | |
| 186 | spftree_area_init (area); |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 187 | |
| 188 | if (newtype & IS_LEVEL_1) |
| 189 | lsp_generate (area, IS_LEVEL_1); |
| 190 | if (newtype & IS_LEVEL_2) |
| 191 | lsp_generate (area, IS_LEVEL_2); |
| 192 | lsp_regenerate_schedule (area, IS_LEVEL_1 | IS_LEVEL_2, 1); |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 193 | |
| 194 | return; |
| 195 | } |
| 196 | |
hasso | 9236588 | 2005-01-18 13:53:33 +0000 | [diff] [blame] | 197 | static void |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 198 | circuit_commence_level (struct isis_circuit *circuit, int level) |
| 199 | { |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 200 | if (level == 1) |
| 201 | { |
| 202 | THREAD_TIMER_ON (master, circuit->t_send_psnp[0], send_l1_psnp, circuit, |
| 203 | isis_jitter (circuit->psnp_interval[0], PSNP_JITTER)); |
hasso | d70f99e | 2004-02-11 20:26:31 +0000 | [diff] [blame] | 204 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 205 | if (circuit->circ_type == CIRCUIT_T_BROADCAST) |
| 206 | { |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 207 | THREAD_TIMER_ON (master, circuit->u.bc.t_run_dr[0], isis_run_dr_l1, |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 208 | circuit, 2 * circuit->hello_interval[0]); |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 209 | |
| 210 | THREAD_TIMER_ON (master, circuit->u.bc.t_send_lan_hello[0], |
| 211 | send_lan_l1_hello, circuit, |
| 212 | isis_jitter (circuit->hello_interval[0], |
| 213 | IIH_JITTER)); |
| 214 | |
| 215 | circuit->u.bc.lan_neighs[0] = list_new (); |
| 216 | } |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 217 | } |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 218 | else |
| 219 | { |
| 220 | THREAD_TIMER_ON (master, circuit->t_send_psnp[1], send_l2_psnp, circuit, |
| 221 | isis_jitter (circuit->psnp_interval[1], PSNP_JITTER)); |
| 222 | |
| 223 | if (circuit->circ_type == CIRCUIT_T_BROADCAST) |
| 224 | { |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 225 | THREAD_TIMER_ON (master, circuit->u.bc.t_run_dr[1], isis_run_dr_l2, |
hasso | a211d65 | 2004-09-20 14:55:29 +0000 | [diff] [blame] | 226 | circuit, 2 * circuit->hello_interval[1]); |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 227 | |
| 228 | THREAD_TIMER_ON (master, circuit->u.bc.t_send_lan_hello[1], |
| 229 | send_lan_l2_hello, circuit, |
| 230 | isis_jitter (circuit->hello_interval[1], |
| 231 | IIH_JITTER)); |
| 232 | |
| 233 | circuit->u.bc.lan_neighs[1] = list_new (); |
| 234 | } |
| 235 | } |
| 236 | |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 237 | return; |
| 238 | } |
| 239 | |
hasso | 9236588 | 2005-01-18 13:53:33 +0000 | [diff] [blame] | 240 | static void |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 241 | circuit_resign_level (struct isis_circuit *circuit, int level) |
| 242 | { |
| 243 | int idx = level - 1; |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 244 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 245 | THREAD_TIMER_OFF (circuit->t_send_csnp[idx]); |
| 246 | THREAD_TIMER_OFF (circuit->t_send_psnp[idx]); |
| 247 | |
| 248 | if (circuit->circ_type == CIRCUIT_T_BROADCAST) |
| 249 | { |
| 250 | THREAD_TIMER_OFF (circuit->u.bc.t_send_lan_hello[idx]); |
| 251 | THREAD_TIMER_OFF (circuit->u.bc.t_run_dr[idx]); |
hasso | 13fb40a | 2005-10-01 06:03:04 +0000 | [diff] [blame] | 252 | THREAD_TIMER_OFF (circuit->u.bc.t_refresh_pseudo_lsp[idx]); |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 253 | circuit->u.bc.run_dr_elect[idx] = 0; |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 254 | list_delete (circuit->u.bc.lan_neighs[idx]); |
| 255 | circuit->u.bc.lan_neighs[idx] = NULL; |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 256 | } |
| 257 | |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 258 | return; |
| 259 | } |
| 260 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 261 | void |
| 262 | isis_event_circuit_type_change (struct isis_circuit *circuit, int newtype) |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 263 | { |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 264 | if (circuit->state != C_STATE_UP) |
| 265 | { |
| 266 | circuit->is_type = newtype; |
| 267 | return; |
| 268 | } |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 269 | |
| 270 | if (isis->debugs & DEBUG_EVENTS) |
hasso | 529d65b | 2004-12-24 00:14:50 +0000 | [diff] [blame] | 271 | zlog_debug ("ISIS-Evt (%s) circuit type change %s -> %s", |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 272 | circuit->area->area_tag, |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 273 | circuit_t2string (circuit->is_type), |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 274 | circuit_t2string (newtype)); |
| 275 | |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 276 | if (circuit->is_type == newtype) |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 277 | return; /* No change */ |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 278 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 279 | if (!(newtype & circuit->area->is_type)) |
| 280 | { |
| 281 | zlog_err ("ISIS-Evt (%s) circuit type change - invalid level %s because" |
| 282 | " area is %s", circuit->area->area_tag, |
| 283 | circuit_t2string (newtype), |
| 284 | circuit_t2string (circuit->area->is_type)); |
| 285 | return; |
| 286 | } |
| 287 | |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 288 | switch (circuit->is_type) |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 289 | { |
| 290 | case IS_LEVEL_1: |
| 291 | if (newtype == IS_LEVEL_2) |
| 292 | circuit_resign_level (circuit, 1); |
| 293 | circuit_commence_level (circuit, 2); |
| 294 | break; |
| 295 | case IS_LEVEL_1_AND_2: |
| 296 | if (newtype == IS_LEVEL_1) |
| 297 | circuit_resign_level (circuit, 2); |
| 298 | else |
| 299 | circuit_resign_level (circuit, 1); |
| 300 | break; |
| 301 | case IS_LEVEL_2: |
| 302 | if (newtype == IS_LEVEL_1) |
| 303 | circuit_resign_level (circuit, 2); |
| 304 | circuit_commence_level (circuit, 1); |
| 305 | break; |
| 306 | default: |
| 307 | break; |
| 308 | } |
| 309 | |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 310 | circuit->is_type = newtype; |
| 311 | lsp_regenerate_schedule (circuit->area, IS_LEVEL_1 | IS_LEVEL_2, 0); |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 312 | |
| 313 | return; |
| 314 | } |
| 315 | |
| 316 | /* 04/18/2002 by Gwak. */ |
| 317 | /************************************************************************** |
| 318 | * |
| 319 | * EVENTS for LSP generation |
| 320 | * |
| 321 | * 1) an Adajacency or Circuit Up/Down event |
| 322 | * 2) a chnage in Circuit metric |
| 323 | * 3) a change in Reachable Address metric |
| 324 | * 4) a change in manualAreaAddresses |
| 325 | * 5) a change in systemID |
| 326 | * 6) a change in DIS status |
| 327 | * 7) a chnage in the waiting status |
| 328 | * |
| 329 | * *********************************************************************** |
| 330 | * |
| 331 | * current support event |
| 332 | * |
| 333 | * 1) Adjacency Up/Down event |
| 334 | * 6) a change in DIS status |
| 335 | * |
| 336 | * ***********************************************************************/ |
| 337 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 338 | void |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 339 | isis_event_adjacency_state_change (struct isis_adjacency *adj, int newstate) |
| 340 | { |
| 341 | /* adjacency state change event. |
| 342 | * - the only proto-type was supported */ |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 343 | |
| 344 | /* invalid arguments */ |
| 345 | if (!adj || !adj->circuit || !adj->circuit->area) |
| 346 | return; |
| 347 | |
hasso | c89c05d | 2005-09-04 21:36:36 +0000 | [diff] [blame] | 348 | if (isis->debugs & DEBUG_EVENTS) |
| 349 | zlog_debug ("ISIS-Evt (%s) Adjacency State change", |
| 350 | adj->circuit->area->area_tag); |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 351 | |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 352 | /* LSP generation again */ |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 353 | lsp_regenerate_schedule (adj->circuit->area, IS_LEVEL_1 | IS_LEVEL_2, 0); |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 354 | |
| 355 | return; |
| 356 | } |
| 357 | |
| 358 | /* events supporting code */ |
| 359 | |
| 360 | int |
| 361 | isis_event_dis_status_change (struct thread *thread) |
| 362 | { |
| 363 | struct isis_circuit *circuit; |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 364 | |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 365 | circuit = THREAD_ARG (thread); |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 366 | |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 367 | /* invalid arguments */ |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 368 | if (!circuit || !circuit->area) |
| 369 | return 0; |
hasso | c89c05d | 2005-09-04 21:36:36 +0000 | [diff] [blame] | 370 | if (isis->debugs & DEBUG_EVENTS) |
| 371 | zlog_debug ("ISIS-Evt (%s) DIS status change", circuit->area->area_tag); |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 372 | |
| 373 | /* LSP generation again */ |
Josh Bailey | 3f045a0 | 2012-03-24 08:35:20 -0700 | [diff] [blame^] | 374 | lsp_regenerate_schedule (circuit->area, IS_LEVEL_1 | IS_LEVEL_2, 0); |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 375 | |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 376 | return 0; |
| 377 | } |
| 378 | |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 379 | void |
hasso | 1cd8084 | 2004-10-07 20:07:40 +0000 | [diff] [blame] | 380 | isis_event_auth_failure (char *area_tag, const char *error_string, u_char *sysid) |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 381 | { |
hasso | c89c05d | 2005-09-04 21:36:36 +0000 | [diff] [blame] | 382 | if (isis->debugs & DEBUG_EVENTS) |
| 383 | zlog_debug ("ISIS-Evt (%s) Authentication failure %s from %s", |
| 384 | area_tag, error_string, sysid_print (sysid)); |
hasso | f390d2c | 2004-09-10 20:48:21 +0000 | [diff] [blame] | 385 | |
jardin | eb5d44e | 2003-12-23 08:09:43 +0000 | [diff] [blame] | 386 | return; |
| 387 | } |