summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-08-08 10:50:43 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-08-15 13:25:44 +0200
commitce19a04aea80f45ca1da80e28bf3a1253138c691 (patch)
treec77a0afabe9f9ac0e469c65b41da391032ceb8e8 /zebra/interface.c
parent2a6a7a656d0d1e0afff091515737cdee2a3dbfe8 (diff)
lib: replace if_add_hook with hook_* logic
This allows modules to register their own additional hooks on interface creation/deletion. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index c4d0363994..48158c82c4 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -2930,8 +2930,8 @@ static int if_config_write(struct vty *vty)
void zebra_if_init(void)
{
/* Initialize interface and new hook. */
- if_add_hook(IF_NEW_HOOK, if_zebra_new_hook);
- if_add_hook(IF_DELETE_HOOK, if_zebra_delete_hook);
+ hook_register_prio(if_add, 0, if_zebra_new_hook);
+ hook_register_prio(if_del, 0, if_zebra_delete_hook);
/* Install configuration write function. */
install_node(&interface_node, if_config_write);