From nobody@FreeBSD.org  Mon Dec  4 13:42:23 2006
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 D9FF616A500
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  4 Dec 2006 13:42:23 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C31F243CD7
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  4 Dec 2006 13:39:09 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id kB4Ddgs5026012
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 4 Dec 2006 13:39:42 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id kB4DdgjE026011;
	Mon, 4 Dec 2006 13:39:42 GMT
	(envelope-from nobody)
Message-Id: <200612041339.kB4DdgjE026011@www.freebsd.org>
Date: Mon, 4 Dec 2006 13:39:42 GMT
From: Cichas<cichas@seznam.cz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Dummynet with multipass ipfw drops packets when reloading FW 
X-Send-Pr-Version: www-3.0

>Number:         106316
>Category:       kern
>Synopsis:       [dummynet] dummynet with multipass ipfw drops packets when reloading FW
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 04 13:50:04 GMT 2006
>Closed-Date:    
>Last-Modified:  Tue Apr 24 05:00:31 GMT 2007
>Originator:     Cichas
>Release:        5.5-Release, 6.1-Release, 6.2-RC1
>Organization:
>Environment:
>Description:
IPFW2 with dummynet pipes 
net.inet.ip.fw.one_pass: 0
no skipto rule

After 'ipfw -f flush' you will get lots of:
ipfw: ouch!, skip past end of rules, denying packet

It's bug because at least kernel rule 65535 should be used for packets going out of pipes after rule flush.

>How-To-Repeat:
PC1 -- ethernet -- PC2
Run iperf test between them

On PC1 od PC2 run:
/sbin/sysctl net.inet.ip.fw.one_pass 0
ipfw pipe 1 config bw 256Kbit/s queue 512KBytes
ipfw pipe 2 config bw 256Kbit/s queue 512KBytes
ipfw add 10 pipe 1 ip from any to any out
ipfw add 10 allow ip from any to any out
ipfw add 20 pipe 2 ip from any to any in
ipfw add 20 allow ip from any to any in
/bin/sleep 20
ipfw -f flush
>Fix:
Only workaround:
/sbin/sysctl net.inet.ip.fw.one_pass=1
$fwcmd -f flush
$fwcmd add 65500 allow all from any to any

sleep XY to flush pipes, load new ruleset, one_pass=0 and delete rule 65500
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Apr 24 05:00:20 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer(s). 

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