tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/48104: Incorrect forwarding of broadcast packets by bridge(4)



On Fri, Feb 28, 2014 at 7:38 AM, Lloyd Parkes
<lloyd%must-have-coffee.gen.nz@localhost> wrote:
>
> On 26/02/2014, at 11:03 pm, Ryota Ozaki <ozaki-r%NetBSD.org@localhost> wrote:
>
>> I've got a problem that iperf -s on a tap with a bridge doesn't work
>> with your patch. It works w/o your patch. The instructions are
>> as follows:
>>
>>
>> # ifconfig bridge0 create
>> # ifconfig bridge0 up
>> # ifconfig tap0 create
>> # ifconfig tap0 192.168.122.67/24 up
>> # brconfig bridge0 add tap0
>> # brconfig bridge0 add vioif0
>> # iperf -s
>> ------------------------------------------------------------
>> Server listening on TCP port 5001
>> TCP window size: 32.0 KByte (default)
>> ------------------------------------------------------------
>> [  4] local 192.168.122.67 port 5001 connected with 192.168.122.1 port 56964
>> vioif0: rx mbuf allocation failed, error code 55
>> vioif0: rx mbuf allocation failed, error code 55
>> vioif0: rx mbuf allocation failed, error code 55
>> vioif0: rx mbuf allocation failed, error code 55
>> vioif0: rx mbuf allocation failed, error code 55
>> vioif0: rx mbuf allocation failed, error code 55
>>
>>
>> Do you have any idea on the error?
>
> Thanks for testing the code. I have no idea what might be causing this 
> problem because the unicast path isn't changed much it shouldn't allocating 
> mbufs any differently from before. I'll look in to right now.

I'm sorry for late replying.

Finally I had time to test this patch again and found some bugs.

http://www.netbsd.org/~ozaki-r/bridge-fix.patch

This is a patch fixing the above problem and others:
- check bif_state in bridge_input only if STP enabled
- don't overwrite bif in bridge_input that would be used afterward
- fix used in pridge_broadcast to be accidentally reset

And also your patch breaks the NetBSD coding style (*), so please follow it.

(*) 
http://cvsweb.netbsd.org/bsdweb.cgi/src/share/misc/style?rev=HEAD&content-type=text/x-cvsweb-markup

Then, the patch will be ok for me, although I want some other
networking guys to check the patch more.

Regards,
  ozaki-r

>
> Cheers,
> Lloyd


Home | Main Index | Thread Index | Old Index