summaryrefslogtreecommitdiff
path: root/zebra/kernel_netlink.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2018-07-23 11:25:31 -0400
committerStephen Worley <sworley@cumulusnetworks.com>2018-07-23 11:25:31 -0400
commitbd7891fd70f041f1bc52f8aae538a33231c489e2 (patch)
treec9711c86e50ad2880356121ec46e0e996228ef87 /zebra/kernel_netlink.c
parent81a2f870dda76dd2fca64fea159ba05e41981d7f (diff)
Style for Add code for fuzzing netlink
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/kernel_netlink.c')
-rw-r--r--zebra/kernel_netlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index 4aed995060..8844e66976 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -308,7 +308,7 @@ static unsigned int netlink_file_counter = 1;
static char netlink_fuzz_file[MAXPATHLEN] = "";
/* Flag for whether to read from file or not */
-static int netlink_read = 0;
+int netlink_read;
/**
* netlink_set_read() - Sets the read flag
@@ -374,6 +374,7 @@ static long netlink_read_file(char *buf, const char *fname)
{
FILE *f;
long file_bytes = -1;
+
zserv_privs.change(ZPRIVS_RAISE);
f = fopen(fname, "r");
if (f) {