From acb594b1d825c6e12369cebb941968ec08c840ce Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 06:24:31 +0200 Subject: Adding upstream version 10.0. Signed-off-by: Daniel Baumann --- isisd/isis_circuit.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'isisd/isis_circuit.c') diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c index ffa6ad3..7819b20 100644 --- a/isisd/isis_circuit.c +++ b/isisd/isis_circuit.c @@ -489,7 +489,6 @@ static uint8_t isis_circuit_id_gen(struct isis *isis, struct interface *ifp) void isis_circuit_if_add(struct isis_circuit *circuit, struct interface *ifp) { - struct listnode *node, *nnode; struct connected *conn; if (if_is_broadcast(ifp)) { @@ -509,20 +508,18 @@ void isis_circuit_if_add(struct isis_circuit *circuit, struct interface *ifp) circuit->circ_type = CIRCUIT_T_UNKNOWN; } - for (ALL_LIST_ELEMENTS(ifp->connected, node, nnode, conn)) + frr_each (if_connected, ifp->connected, conn) isis_circuit_add_addr(circuit, conn); - } void isis_circuit_if_del(struct isis_circuit *circuit, struct interface *ifp) { - struct listnode *node, *nnode; struct connected *conn; assert(circuit->interface == ifp); /* destroy addresses */ - for (ALL_LIST_ELEMENTS(ifp->connected, node, nnode, conn)) + frr_each_safe (if_connected, ifp->connected, conn) isis_circuit_del_addr(circuit, conn); circuit->circ_type = CIRCUIT_T_UNKNOWN; @@ -1680,6 +1677,8 @@ void isis_circuit_init(void) #else if_cmd_init_default(); #endif - if_zapi_callbacks(isis_ifp_create, isis_ifp_up, - isis_ifp_down, isis_ifp_destroy); + hook_register_prio(if_real, 0, isis_ifp_create); + hook_register_prio(if_up, 0, isis_ifp_up); + hook_register_prio(if_down, 0, isis_ifp_down); + hook_register_prio(if_unreal, 0, isis_ifp_destroy); } -- cgit v1.2.3