summaryrefslogtreecommitdiffstats
path: root/isisd/isis_circuit.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:31 +0000
commitacb594b1d825c6e12369cebb941968ec08c840ce (patch)
treed544788908e7353a4f117e2991f15f4236a0c963 /isisd/isis_circuit.c
parentAdding upstream version 9.1. (diff)
downloadfrr-acb594b1d825c6e12369cebb941968ec08c840ce.tar.xz
frr-acb594b1d825c6e12369cebb941968ec08c840ce.zip
Adding upstream version 10.0.upstream/10.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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);
}