return 0;
}
+/* Reset IS hello timer after interval change */
+void isis_reset_hello_timer(struct isis_circuit *circuit)
+{
+ /* First send an immediate hello to prevent adjacency loss
+ * during longer hello interval transitions
+ */
+ if (circuit->circ_type == CIRCUIT_T_BROADCAST) {
+ /* For broadcast circuits - need to handle both levels */
+ if (circuit->is_type & IS_LEVEL_1) {
+ /* send hello immediately */
+ send_hello(circuit, IS_LEVEL_1);
+
+ /* reset level-1 hello timer */
+ EVENT_OFF(circuit->u.bc.t_send_lan_hello[0]);
+ if (circuit->area && (circuit->area->is_type & IS_LEVEL_1))
+ send_hello_sched(circuit, IS_LEVEL_1,
+ isis_jitter(circuit->hello_interval[0],
+ IIH_JITTER));
+ }
+
+ if (circuit->is_type & IS_LEVEL_2) {
+ /* send hello immediately */
+ send_hello(circuit, IS_LEVEL_2);
+
+ /* reset level-2 hello timer */
+ EVENT_OFF(circuit->u.bc.t_send_lan_hello[1]);
+ if (circuit->area && (circuit->area->is_type & IS_LEVEL_2))
+ send_hello_sched(circuit, IS_LEVEL_2,
+ isis_jitter(circuit->hello_interval[1],
+ IIH_JITTER));
+ }
+ } else if (circuit->circ_type == CIRCUIT_T_P2P) {
+ /* For point-to-point circuits */
+ send_hello(circuit, IS_LEVEL_1);
+
+ /* reset hello timer */
+ EVENT_OFF(circuit->u.p2p.t_send_p2p_hello);
+ send_hello_sched(circuit, 0, isis_jitter(circuit->hello_interval[0], IIH_JITTER));
+ }
+}
+
void isis_circuit_init(void)
{
/* Initialize Zebra interface data structure */
int isis_circuit_mt_enabled_set(struct isis_circuit *circuit, uint16_t mtid,
bool enabled);
+/* Reset ISIS hello timer and send immediate hello */
+void isis_reset_hello_timer(struct isis_circuit *circuit);
+
#ifdef FABRICD
DECLARE_HOOK(isis_circuit_config_write,
(struct isis_circuit *circuit, struct vty *vty),
if (!circuit)
return CMD_ERR_NO_MATCH;
+ uint32_t old_interval_l1 = circuit->hello_interval[0];
+ uint32_t old_interval_l2 = circuit->hello_interval[1];
+
circuit->hello_interval[0] = interval;
circuit->hello_interval[1] = interval;
+ /* if interval changed, reset hello timer */
+ if (old_interval_l1 != interval || old_interval_l2 != interval) {
+ isis_reset_hello_timer(circuit);
+ }
+
return CMD_SUCCESS;
}