[Bridge] Lost TCP packet

Louis Croisez louis.croisez at gmail.com
Tue Feb 14 00:42:32 PST 2006

i am testing two bridges by sending to it random packets using hping2.
First i create a random-length file, then i send it a lot of time on
the wire using this command:
for ($i=0; $i<50000; $i++) {  hping2 -q -c 1 -d $data_len -E
random.file  }

My problem is that some packets are lost.
Here is my setup:
               PC1 ( ===== BR1 --------- BR2 ===== PC2 (

After analysis, i determined that these packets were lost because one
of the two bridges was in BR_STATE_DISABLED state when the lost packet
In fact, the packet is thrown by the bridge because, in
br_input.c::br_handle_frame(), state==BR_STATE_DISABLED which force
the code to jump to the err: tag at the end of this function.
The state is set to this value while an event is received inside
br_notify.c::br_device_event(), which do a br_stp_disable_port().
After putting some printk in br_notify.c, i remarked that this event
come regularly, and always related to the same bridge port (eth1).
It don't hurt me that this event come regularly, but problem is when a
packet is flowing in the same time thru the bridge, which cause it to
be lost.

I suspect a wrong bridge configuration from me. What i would like to know is:
-  what do i wrong to get this events fired?
-  what should i do to correct this behavior?


More information about the Bridge mailing list