Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Mar 2019 09:33:16 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r344921 - head/sys/netpfil/pf
Message-ID:  <201903080933.x289XGrm064745@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Fri Mar  8 09:33:16 2019
New Revision: 344921
URL: https://svnweb.freebsd.org/changeset/base/344921

Log:
  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
  MFC after:	1 week

Modified:
  head/sys/netpfil/pf/pf_ioctl.c

Modified: head/sys/netpfil/pf/pf_ioctl.c
==============================================================================
--- head/sys/netpfil/pf/pf_ioctl.c	Fri Mar  8 09:18:29 2019	(r344920)
+++ head/sys/netpfil/pf/pf_ioctl.c	Fri Mar  8 09:33:16 2019	(r344921)
@@ -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++) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903080933.x289XGrm064745>