summaryrefslogtreecommitdiff
path: root/lib/zclient.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-08-06 07:35:50 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-08-08 11:14:05 +0200
commit689f5a8c84b95dbd31ecab481f8f2977965fe741 (patch)
tree7c2a2b69908b3c3ac60e0de41b5a3f85caec2ef5 /lib/zclient.h
parent00857b241e6c27efad54a19b4226c37f04d80bf5 (diff)
*: remove --enable-tcp-zebra, rework ZAPI path
This adds "@tcp" as new choice on the -z option present in zebra and the protocol daemons. The --enable-tcp-zebra option on configure is no longer needed, both UNIX and TCP socket support is always available. Note that @tcp should not be used by default (e.g. in an init script), and --enable-tcp-zebra should never have been in any distro package builds, because **** TCP-ZEBRA IS A SECURITY PROBLEM **** It allows arbitrary local users to mess with the routing table and inject bogus data -- and also ZAPI is not designed to be robust against attacks. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/zclient.h')
-rw-r--r--lib/zclient.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/zclient.h b/lib/zclient.h
index 435d26e2f9..2752acc281 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -36,6 +36,14 @@
/* Zebra header size. */
#define ZEBRA_HEADER_SIZE 8
+/* special socket path name to use TCP
+ * @ is used as first character because that's abstract socket names on Linux
+ */
+#define ZAPI_TCP_PATHNAME "@tcp"
+
+extern struct sockaddr_storage zclient_addr;
+extern socklen_t zclient_addr_len;
+
/* Zebra message types. */
typedef enum {
ZEBRA_INTERFACE_ADD,
@@ -275,8 +283,6 @@ extern void zclient_reset(struct zclient *);
extern void zclient_free(struct zclient *);
extern int zclient_socket_connect(struct zclient *);
-extern void zclient_serv_path_set(char *path);
-extern const char *zclient_serv_path_get(void);
extern u_short *redist_check_instance(struct redist_proto *, u_short);
extern void redist_add_instance(struct redist_proto *, u_short);