svn commit: r310094 - stable/10/sys/netpfil/pf

Kristof Provost kp at FreeBSD.org
Wed Dec 14 21:30:36 UTC 2016


Author: kp
Date: Wed Dec 14 21:30:35 2016
New Revision: 310094
URL: https://svnweb.freebsd.org/changeset/base/310094

Log:
  MFC r309563: pflog: Correctly initialise subrulenr
  
  subrulenr is considered unset if it's set to -1, not if it's set to 1.
  See contrib/tcpdump/print-pflog.c pflog_print() for a user.
  
  This caused incorrect pflog output (tcpdump -n -e -ttt -i pflog0):
    rule 0..16777216(match)
  instead of the correct output of
    rule 0/0(match)
  
  PR:		214832
  Submitted by:	andywhite at gmail.com

Modified:
  stable/10/sys/netpfil/pf/if_pflog.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netpfil/pf/if_pflog.c
==============================================================================
--- stable/10/sys/netpfil/pf/if_pflog.c	Wed Dec 14 21:29:12 2016	(r310093)
+++ stable/10/sys/netpfil/pf/if_pflog.c	Wed Dec 14 21:30:35 2016	(r310094)
@@ -217,7 +217,7 @@ pflog_packet(struct pfi_kif *kif, struct
 
 	if (am == NULL) {
 		hdr.rulenr = htonl(rm->nr);
-		hdr.subrulenr =  1;
+		hdr.subrulenr = -1;
 	} else {
 		hdr.rulenr = htonl(am->nr);
 		hdr.subrulenr = htonl(rm->nr);


More information about the svn-src-all mailing list