svn commit: r292288 - stable/10/sbin/pfctl

Kristof Provost kp at FreeBSD.org
Tue Dec 15 21:02:55 UTC 2015


Author: kp
Date: Tue Dec 15 21:02:53 2015
New Revision: 292288
URL: https://svnweb.freebsd.org/changeset/base/292288

Log:
  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

Modified:
  stable/10/sbin/pfctl/pfctl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/pfctl/pfctl.c
==============================================================================
--- stable/10/sbin/pfctl/pfctl.c	Tue Dec 15 19:57:56 2015	(r292287)
+++ stable/10/sbin/pfctl/pfctl.c	Tue Dec 15 21:02:53 2015	(r292288)
@@ -1845,6 +1845,7 @@ pfctl_set_debug(struct pfctl *pf, char *
 	}
 
 	pf->debug_set = 1;
+	level = pf->debug;
 
 	if ((pf->opts & PF_OPT_NOACTION) == 0)
 		if (ioctl(dev, DIOCSETDEBUG, &level))


More information about the svn-src-all mailing list