Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Mar 2019 11:01:49 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r345175 - stable/12/sys/netpfil/pf
Message-ID:  <201903151101.x2FB1n2N060729@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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++) {



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