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
This commit is contained in:
Kristof Provost 2015-11-01 17:20:17 +00:00
parent 11113be653
commit 3e768368d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=290236

View File

@ -1840,6 +1840,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))