summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/zclient.c3
-rw-r--r--lib/zclient.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index d3d53227..0d531ce7 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -32,6 +32,7 @@
#include "zclient.h"
#include "memory.h"
#include "table.h"
+#include "paths.h"
/* Zebra client events. */
enum event {ZCLIENT_SCHEDULE, ZCLIENT_READ, ZCLIENT_CONNECT};
@@ -317,7 +318,7 @@ zclient_start (struct zclient *zclient)
#ifdef HAVE_TCP_ZEBRA
zclient->sock = zclient_socket ();
#else
- zclient->sock = zclient_socket_un (ZEBRA_SERV_PATH);
+ zclient->sock = zclient_socket_un (path_state (ZEBRA_SERV_NAME));
#endif /* HAVE_TCP_ZEBRA */
if (zclient->sock < 0)
{
diff --git a/lib/zclient.h b/lib/zclient.h
index 21786ab8..6a63ffa4 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -28,6 +28,9 @@
/* For input/output buffer to zebra. */
#define ZEBRA_MAX_PACKET_SIZ 4096
+/* Name of the zebra API socket */
+#define ZEBRA_SERV_NAME "zserv.api"
+
/* Zebra header size. */
#define ZEBRA_HEADER_SIZE 6