https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202996
Bug ID: 202996
Summary: pfctl: unitialized variable level in pfctl_set_debug
Product: Base System
Version: 10.2-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
In pfctl.c, there is a function named pfctl_set_debug.
The variable "level" in that function is declared but not initialized and used
in
if (ioctl(dev, DIOCSETDEBUG, &level))
This can effectively set the pf debug level to loud (in my case it always does)
causing lots of messages on the console and syslog while the ruleset is loaded.
In my case, this seems to have a serious impact on performance.
I've made a patch:
--- /home/kolontai/pfctl.c 2015-09-09 17:11:05.016276000 +0200
+++ pfctl.c 2015-09-09 15:37:05.849986000 +0200
@@ -1845,6 +1845,8 @@
}
pf->debug_set = 1;
+ level = pf->debug;
+
if ((pf->opts & PF_OPT_NOACTION) == 0)
if (ioctl(dev, DIOCSETDEBUG, &level))
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"