summaryrefslogtreecommitdiffstats
path: root/isisd/isis_circuit.c
diff options
context:
space:
mode:
Diffstat (limited to 'isisd/isis_circuit.c')
-rw-r--r--isisd/isis_circuit.c13
1 files changed, 6 insertions, 7 deletions
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);
}