Bug 138850 - [dummynet] dummynet doesn't work correctly on a bridge
Summary: [dummynet] dummynet doesn't work correctly on a bridge
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-15 17:20 UTC by Dan D Niles
Modified: 2018-01-03 05:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan D Niles 2009-09-15 17:20:07 UTC
	I've set up a bridge which works exactly as advertised.
	When I add a bandwith limit with dummynet, the bridge stops
	passing traffic.

	Here are the lines from my rc.conf file:

ifconfig_bge0="inet 192.168.0.1 netmask 255.255.255.0"
cloned_interfaces="bridge0"
ifconfig_xl0="up"
ifconfig_xl1="up"
ifconfig_bridge0="addm xl0 addm xl1 up"
firewall_enable="YES"
firewall_script="/etc/ipfw.rules"
dummynet_enable="YES"

	Here is my ipfw.rules file:

throttle=10.10.10.0/24
limit=1Mbit/s

ipfw -q -f flush
ipfw -q add allow all from any to any via bge0
ipfw -q add allow all from any to any via xl0
ipfw -q add allow all from any to any via bridge0

ipfw -q pipe 1000 config mask dst-ip 0x000000ff bw $limit
ipfw -q add pipe 1000 ip from any to $throttle via xl1

ipfw -q pipe 1001 config mask src-ip 0x000000ff bw $limit
ipfw -q add pipe 1001 ip from $throttle to any via xl1

ipfw -q add 60000 allow all from any to any

	If I change the limit to 0 (no limit) it starts passing traffic.
	Change it to any value, and it stops passing traffic.

	I did a tcpdump of the traffic and it gets to bridge0 but
	not any further.

	I tried moving the pipes to xl0 and bridge0 and the behaviour
	is the same.  I also tried it on FreeBSD 6.3 with the same 
	results.

	If I set up the machine as a router and use basically the
	same rules (no bridge0) it works exacly as expected.

Fix: 

I wish I knew.
How-To-Repeat: 	Set up a FreeBSD server as a bridge, verify that it works.
		I have 3 interfaces: a management interface and
			2 for the bridge.
	Enable ipfw and dummynet, use the ipfw.rules listed above 
		(adjusted for your network).
	Traffic will not pass over the bridge.
	Change the limit to 0 and traffic will pass.

	I have set up 3 different servers (one with FreeBSD 6.3) and
	the problem was present every time.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2009-09-16 02:07:55 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:58 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped