summaryrefslogtreecommitdiffstats
path: root/zebra/zserv.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-11-02 15:56:03 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-11-09 19:16:45 +0100
commit411314ed4fbb407adc0cf50bfce5469f8d673e65 (patch)
tree6bd3c196e37ebc461c2250f74fd2019da664cfd6 /zebra/zserv.h
parentospf6d: Fix setting interface ipv6 ospf6 cost value (LSA hooks were never cal... (diff)
downloadfrr-411314ed4fbb407adc0cf50bfce5469f8d673e65.tar.xz
frr-411314ed4fbb407adc0cf50bfce5469f8d673e65.zip
configure, zebra: Add some debug code to allow for fuzzing
1) Write zserv api commands( one of each type ) to the side. This will allow us to use them as input for a fuzzer. 2) Add -c <file to pass to zapi read process> into zebra as a run-time option of we've turned on fuzzing. While in and of itself these are not terribly useful( you still need an external fuzzer ), they provide an infrastructure to allow tools like afl to test the zapi. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zserv.h')
-rw-r--r--zebra/zserv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/zserv.h b/zebra/zserv.h
index 279b56ec3..60e055088 100644
--- a/zebra/zserv.h
+++ b/zebra/zserv.h
@@ -193,4 +193,8 @@ extern int zebra_server_send_message(struct zserv *client);
extern struct zserv *zebra_find_client(u_char proto);
+#if defined(HANDLE_ZAPI_FUZZING)
+extern void zserv_read_file(char *input);
+#endif
+
#endif /* _ZEBRA_ZEBRA_H */