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++) {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to