summaryrefslogtreecommitdiffstats
path: root/zebra/irdp_main.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-08-06 08:08:39 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-08-15 13:25:44 +0200
commit2eb27eecf011a06c01e58a735d8bf087d7519979 (patch)
treef0e4940b3df2cb3caaf99d9806dd738c906e609a /zebra/irdp_main.c
parentlib: replace if_add_hook with hook_* logic (diff)
downloadfrr-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_main.c')
-rw-r--r--zebra/irdp_main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c
index 6220c9d81..e463608af 100644
--- a/zebra/irdp_main.c
+++ b/zebra/irdp_main.c
@@ -301,7 +301,7 @@ void process_solicit(struct interface *ifp)
&irdp->t_advertise);
}
-void irdp_finish()
+static int irdp_finish(void)
{
struct vrf *vrf;
struct listnode *node, *nnode;
@@ -328,4 +328,11 @@ void irdp_finish()
}
}
+void irdp_init(void)
+{
+ irdp_if_init();
+
+ hook_register(frr_early_fini, irdp_finish);
+}
+
#endif /* HAVE_IRDP */