summaryrefslogtreecommitdiffstats
path: root/ripngd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-09-23 22:26:56 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-09-23 22:26:56 +0200
commit4140ca4d153e8949afd6abc9e00fbbac3d47799c (patch)
treee21a92656dd140a433ce626128fc89801ef926a2 /ripngd
parentvtysh: Allow display of individual daemons configs (diff)
downloadfrr-4140ca4d153e8949afd6abc9e00fbbac3d47799c.tar.xz
frr-4140ca4d153e8949afd6abc9e00fbbac3d47799c.zip
lib: zclient.c remove extern struct thread_master *
zclient.c depended upon link time inclusion of a extern struct thread_master *master. This is a violation of the namespace of the calling daemon. If a library needs the pointer pass it in and save it for future use. This code change also makes the zclient code consistent with the other lib functions that need to schedule work on your behalf Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripng_main.c2
-rw-r--r--ripngd/ripng_zebra.c4
-rw-r--r--ripngd/ripngd.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c
index 522c48272..01590d96d 100644
--- a/ripngd/ripng_main.c
+++ b/ripngd/ripng_main.c
@@ -279,7 +279,7 @@ main (int argc, char **argv)
/* RIPngd inits. */
ripng_init ();
- zebra_init ();
+ zebra_init(master);
ripng_peer_init ();
/* Get configuration file. */
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index 09dd3390f..278ca7671 100644
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -502,10 +502,10 @@ static struct cmd_node zebra_node =
/* Initialize zebra structure and it's commands. */
void
-zebra_init ()
+zebra_init (struct thread_master *master)
{
/* Allocate zebra structure. */
- zclient = zclient_new ();
+ zclient = zclient_new(master);
zclient_init (zclient, ZEBRA_ROUTE_RIPNG, 0);
zclient->interface_up = ripng_interface_up;
diff --git a/ripngd/ripngd.h b/ripngd/ripngd.h
index ab06d81bf..884f3ed9b 100644
--- a/ripngd/ripngd.h
+++ b/ripngd/ripngd.h
@@ -355,7 +355,7 @@ extern void ripng_route_map_init (void);
extern void ripng_route_map_reset (void);
extern void ripng_terminate (void);
/* zclient_init() is done by ripng_zebra.c:zebra_init() */
-extern void zebra_init (void);
+extern void zebra_init(struct thread_master *);
extern void ripng_zclient_start (void);
extern void ripng_zclient_reset (void);
extern void ripng_offset_init (void);