From nobody@FreeBSD.org  Mon Jun 11 12:42:23 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 13970106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 11 Jun 2012 12:42:23 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id F37608FC17
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 11 Jun 2012 12:42:22 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q5BCgM21087295
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 11 Jun 2012 12:42:22 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q5BCgMOC087294;
	Mon, 11 Jun 2012 12:42:22 GMT
	(envelope-from nobody)
Message-Id: <201206111242.q5BCgMOC087294@red.freebsd.org>
Date: Mon, 11 Jun 2012 12:42:22 GMT
From: Raid <strldd@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: PF: direction scrub rules don't work 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         168952
>Category:       kern
>Synopsis:       [pf] direction scrub rules don't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-pf
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 11 12:50:10 UTC 2012
>Closed-Date:    
>Last-Modified:  Sun Jun 17 22:39:22 UTC 2012
>Originator:     Raid
>Release:        9.0
>Organization:
IBM
>Environment:
FreeBSD 9.0 i386 
>Description:
Reproduced on amd64 
-------------------
no functionality when adding a scrub rule to direction [in/out]
example code:
scrub out on $ext

to further debug this problem i added "log" to the rule:
scrub log in on $ext_if 
when running tcpdump on pflog0, i still get logs only on the default clean up rule in my script :
block log all 

$tcpdump -neti pflog0: 
rule 1/0(match): block in on pppoe0: x.x.x.x.64454 > x.x.x.x.234.51831:  tcp 40 [bad hdr length 0 - too short, < 20]


>How-To-Repeat:
install FreeBSD I386/AMD64 and compile the kernel with the following options:
options         ALTQ
options         ALTQ_CBQ        
options         ALTQ_RED        
options         ALTQ_RIO        
options         ALTQ_HFSC       
options         ALTQ_PRIQ      
options         ALTQ_NOPCC     

-Generate a pf script:
ext_if="em0"
set skip on lo0
scrub log out on $ext_if
block log in 
pass out 

run tcpdump against pflog0:
see that you extract the logs of the default rule



 
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-pf 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Jun 17 22:39:07 UTC 2012 
Responsible-Changed-Why:  
reclassify. 

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