diff options
author | kp <kp@FreeBSD.org> | 2015-12-15 21:02:53 +0000 |
---|---|---|
committer | kp <kp@FreeBSD.org> | 2015-12-15 21:02:53 +0000 |
commit | 0696c87609cb06af71377db0d481f43e7bd039c2 (patch) | |
tree | f14e590725531f9b9646e9f54db08d0a249f97ac /sbin | |
parent | f5aa9d7c17d766c6c46fd76262196deca017aabb (diff) | |
download | FreeBSD-src-0696c87609cb06af71377db0d481f43e7bd039c2.zip FreeBSD-src-0696c87609cb06af71377db0d481f43e7bd039c2.tar.gz |
MFC r290236
pfctl: Fix uninitialised veriable
In pfctl_set_debug() we used 'level' without ever initialising it.
We correctly parsed the option, but them failed to actually assign the parsed
value to 'level' before performing to ioctl() to configure the debug level.
PR: 202996
Submitted by: Andrej Kolontai
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pfctl/pfctl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 64b4a05..f8802b3 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1845,6 +1845,7 @@ pfctl_set_debug(struct pfctl *pf, char *d) } pf->debug_set = 1; + level = pf->debug; if ((pf->opts & PF_OPT_NOACTION) == 0) if (ioctl(dev, DIOCSETDEBUG, &level)) |