diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2017-08-06 08:08:39 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2017-08-15 13:25:44 +0200 |
commit | 2eb27eecf011a06c01e58a735d8bf087d7519979 (patch) | |
tree | f0e4940b3df2cb3caaf99d9806dd738c906e609a /zebra/irdp_interface.c | |
parent | lib: replace if_add_hook with hook_* logic (diff) | |
download | frr-2eb27eecf011a06c01e58a735d8bf087d7519979.tar.xz frr-2eb27eecf011a06c01e58a735d8bf087d7519979.zip |
zebra: start detangling rtadv & irdp
Replace some cross-dependencies with hooks & move bits to where they
belong.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/irdp_interface.c')
-rw-r--r-- | zebra/irdp_interface.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c index 5682e12e6..032090adf 100644 --- a/zebra/irdp_interface.c +++ b/zebra/irdp_interface.c @@ -316,7 +316,7 @@ static void irdp_if_no_shutdown(struct interface *ifp) /* Write configuration to user */ -void irdp_config_write(struct vty *vty, struct interface *ifp) +int irdp_config_write(struct vty *vty, struct interface *ifp) { struct zebra_if *zi = ifp->info; struct irdp_interface *irdp = &zi->irdp; @@ -348,6 +348,7 @@ void irdp_config_write(struct vty *vty, struct interface *ifp) vty_out(vty, " ip irdp maxadvertinterval %ld\n", irdp->MaxAdvertInterval); } + return 0; } @@ -678,8 +679,10 @@ DEFUN (ip_irdp_debug_disable, return CMD_SUCCESS; } -void irdp_init() +void irdp_if_init() { + hook_register(zebra_if_config_wr, irdp_config_write); + install_element(INTERFACE_NODE, &ip_irdp_broadcast_cmd); install_element(INTERFACE_NODE, &ip_irdp_multicast_cmd); install_element(INTERFACE_NODE, &no_ip_irdp_cmd); |