From ohauer@FreeBSD.org  Sun Jul 17 15:31:51 2011
Return-Path: <ohauer@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A492E106564A;
	Sun, 17 Jul 2011 15:31:51 +0000 (UTC)
	(envelope-from ohauer@FreeBSD.org)
Received: from p578be941.dip0.t-ipconnect.de (p578be941.dip0.t-ipconnect.de [87.139.233.65])
	by mx1.freebsd.org (Postfix) with ESMTP id 674318FC08;
	Sun, 17 Jul 2011 15:31:51 +0000 (UTC)
Received: by p578be941.dip0.t-ipconnect.de (Postfix, from userid 1100)
	id 31DC920547; Sun, 17 Jul 2011 17:31:48 +0200 (CEST)
Message-Id: <20110717153148.31DC920547@p578be941.dip0.t-ipconnect.de>
Date: Sun, 17 Jul 2011 17:31:48 +0200 (CEST)
From: Olli Hauer <ohauer@FreeBSD.org>
Reply-To: Olli Hauer <ohauer@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Bjoern A. Zeeb <bz@FreeBSD.org>
Subject: [patch] pf in head, pfioc_state_kill in pf(4) does not reflect pfioc_state_kill in sys/pf/net/pfvar.h
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         158997
>Category:       kern
>Synopsis:       [patch] pf in head, pfioc_state_kill in pf(4) does not reflect pfioc_state_kill in sys/pf/net/pfvar.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bz
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 17 15:40:08 UTC 2011
>Closed-Date:    Sun Jul 17 18:25:19 UTC 2011
>Last-Modified:  Sun Jul 17 18:25:19 UTC 2011
>Originator:     Olli Hauer
>Release:        
>Organization:
>Environment:


>Description:
The pfioc_state_kill in pf(4) does not reflect pfioc_state_kill in sys/pf/net/pfvar.h 

Documentation was also wrong in OpenBSD45.

I send a correction request already to the freebsd-pf@ list a view weeks ago,
but the following patch is more accurate.
http://lists.freebsd.org/pipermail/freebsd-pf/2011-June/006193.html

It will be nice if this trival fix can be included even code freeze is in place.

>How-To-Repeat:
compair pfioc_state_kill in contrib/man/pf.4 and sys/pf/net/pfvar.h

>Fix:
patch against head in svn.


--- pf_head.diff begins here ---
Index: head/contrib/pf/man/pf.4
===================================================================
--- head/contrib/pf/man/pf.4	(revision 224128)
+++ head/contrib/pf/man/pf.4	(working copy)
@@ -308,14 +308,17 @@
 .It Dv DIOCKILLSTATES Fa "struct pfioc_state_kill *psk"
 Remove matching entries from the state table.
 This ioctl returns the number of killed states in
-.Va psk_af .
+.Va psk_killed .
 .Bd -literal
 struct pfioc_state_kill {
+	struct pf_state_cmp	psk_pfcmp;
 	sa_family_t		psk_af;
 	int			psk_proto;
 	struct pf_rule_addr	psk_src;
 	struct pf_rule_addr	psk_dst;
 	char			psk_ifname[IFNAMSIZ];
+	char			psk_label[PF_RULE_LABEL_SIZE];
+	u_int			psk_killed;
 };
 .Ed
 .It Dv DIOCCLRSTATES Fa "struct pfioc_state_kill *psk"
--- pf_head.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->bz 
Responsible-Changed-By: bz 
Responsible-Changed-When: Sun Jul 17 15:45:55 UTC 2011 
Responsible-Changed-Why:  
I'll just do it 

http://www.freebsd.org/cgi/query-pr.cgi?pr=158997 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/158997: commit references a PR
Date: Sun, 17 Jul 2011 17:33:53 +0000 (UTC)

 Author: bz
 Date: Sun Jul 17 17:33:39 2011
 New Revision: 224141
 URL: http://svn.freebsd.org/changeset/base/224141
 
 Log:
   Correct the description of struct pfioc_state_kill.
   
   PR:		kern/158997
   Submitted by:	ohauer
 
 Modified:
   head/contrib/pf/man/pf.4
 
 Modified: head/contrib/pf/man/pf.4
 ==============================================================================
 --- head/contrib/pf/man/pf.4	Sun Jul 17 17:12:17 2011	(r224140)
 +++ head/contrib/pf/man/pf.4	Sun Jul 17 17:33:39 2011	(r224141)
 @@ -28,7 +28,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd June 28 2011
 +.Dd July 17 2011
  .Dt PF 4
  .Os
  .Sh NAME
 @@ -308,14 +308,17 @@ structure from the state table.
  .It Dv DIOCKILLSTATES Fa "struct pfioc_state_kill *psk"
  Remove matching entries from the state table.
  This ioctl returns the number of killed states in
 -.Va psk_af .
 +.Va psk_killed .
  .Bd -literal
  struct pfioc_state_kill {
 +	struct pf_state_cmp	psk_pfcmp;
  	sa_family_t		psk_af;
  	int			psk_proto;
  	struct pf_rule_addr	psk_src;
  	struct pf_rule_addr	psk_dst;
  	char			psk_ifname[IFNAMSIZ];
 +	char			psk_label[PF_RULE_LABEL_SIZE];
 +	u_int			psk_killed;
  };
  .Ed
  .It Dv DIOCCLRSTATES Fa "struct pfioc_state_kill *psk"
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: bz 
State-Changed-When: Sun Jul 17 18:24:55 UTC 2011 
State-Changed-Why:  
Committed to HEAD.  Thanks a lot for reporting and email! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=158997 
>Unformatted:
