/* For debug purpose. */
/* SET_FLAG (zebra_debug_event, ZEBRA_DEBUG_EVENT); */
-#if defined(HANDLE_ZAPI_FUZZING)
- if (fuzzing) {
- zserv_read_file(fuzzing);
- exit(0);
- }
-#endif
-
/* Process the configuration file. Among other configuration
* directives we can meet those installing static routes. Such
* requests will not be executed immediately, but queued in
/* RNH init */
zebra_rnh_init();
+#if defined(HANDLE_ZAPI_FUZZING)
+ if (fuzzing) {
+ zserv_read_file(fuzzing);
+ exit(0);
+ }
+#endif
+
+
frr_run(zebrad.master);
/* Not reached... */
* sock
* client's socket file descriptor
*/
-static void zserv_client_create(int sock)
+static struct zserv *zserv_client_create(int sock)
{
struct zserv *client;
int i;
/* start pthread */
frr_pthread_run(client->pthread, NULL);
+
+ return client;
}
/*
struct zserv *client = NULL;
struct thread t;
- zserv_client_create(-1);
-
- frr_pthread_stop(client->pthread, NULL);
- frr_pthread_destroy(client->pthread);
- client->pthread = NULL;
-
- t.arg = client;
-
fd = open(input, O_RDONLY | O_NONBLOCK);
t.u.fd = fd;
- zserv_read(&t);
-
- close(fd);
+ zserv_client_create(fd);
}
#endif