svn commit: r345175 - stable/12/sys/netpfil/pf

Kristof Provost kp at FreeBSD.org
Fri Mar 15 11:01:50 UTC 2019


Author: kp
Date: Fri Mar 15 11:01:49 2019
New Revision: 345175
URL: https://svnweb.freebsd.org/changeset/base/345175

Log:
  MFC r344921:
  
  pf: Fix DIOCGETSRCNODES
  
  r343295 broke DIOCGETSRCNODES by failing to reset 'nr' after counting the
  number of source tracking nodes.
  This meant that we never copied the information to userspace, leading to '? ->
  ?' output from pfctl.
  
  PR:		236368

Modified:
  stable/12/sys/netpfil/pf/pf_ioctl.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netpfil/pf/pf_ioctl.c
==============================================================================
--- stable/12/sys/netpfil/pf/pf_ioctl.c	Fri Mar 15 08:21:11 2019	(r345174)
+++ stable/12/sys/netpfil/pf/pf_ioctl.c	Fri Mar 15 11:01:49 2019	(r345175)
@@ -3754,6 +3754,8 @@ DIOCCHANGEADDR_error:
 			break;
 		}
 
+		nr = 0;
+
 		p = pstore = malloc(psn->psn_len, M_TEMP, M_WAITOK);
 		for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask;
 		    i++, sh++) {


More information about the svn-src-all mailing list