diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2018-07-19 15:21:29 -0400 | 
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2018-07-21 00:06:38 -0400 | 
| commit | 81a2f870dda76dd2fca64fea159ba05e41981d7f (patch) | |
| tree | f6209133d66370d8ebe993fb74e6ec9898370fe9 /zebra/kernel_netlink.h | |
| parent | 7087ced7add0978047fa9df0ad62f47134109a69 (diff) | |
zebra: Add code for fuzzing netlink
This code allows you to fuzz the netlink listening socket
in zebra by --enable-fuzzing and passing the -w [FILE]
option when running zebra.
File collection is stored in /var/run/frr/netlink_*
where each number is just a counter to keep the
files distinct.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/kernel_netlink.h')
| -rw-r--r-- | zebra/kernel_netlink.h | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/kernel_netlink.h b/zebra/kernel_netlink.h index 80bb876e0b..78bfdfa178 100644 --- a/zebra/kernel_netlink.h +++ b/zebra/kernel_netlink.h @@ -45,6 +45,10 @@ extern const char *nl_rtproto_to_str(uint8_t rtproto);  extern const char *nl_family_to_str(uint8_t family);  extern const char *nl_rttype_to_str(uint8_t rttype); +#if defined(HANDLE_ZAPI_FUZZING) +extern void set_netlink_read(int flag); +extern void netlink_read_init(const char *fname); +#endif  extern int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),  			      struct nlsock *nl, struct zebra_ns *zns,  			      int count, int startup);  | 
