[PATCH] SysKonnect Yukon driver promiscuous mode fix

Jung-uk Kim jkim at niksun.com
Mon Dec 15 14:02:33 PST 2003


I am re-sending it to your private e-mail just in case you missed 
@FreeBSD.Org e-mail. ;-)
--------------
(I am CC'ing Nathan L. Binkert because my patch was originally from
OpenBSD.)

Here is the first patch for the bug.

It is very simple to reproduce the bug.  Run tcpdump on the
 interface, e.g., 'tcpdump -i sk0'.  You will see all packets on the
 segment. While in promiscuous mode (i.e., don't quit tcpdump), try
 'ifconfig <iface> down', e.g., 'ifconfig sk0 down', and bring it
 back up, e.g., 'ifconfig sk0 up'.  You will only see your packets or
 broadcast packets.  This bug also causes multicast filter to be
 cleaned up.

This patch simplifies IFF_PROMISC checking from sk_ioctl() and
prevents the inteface from getting re-initialized when you change
other flags, e.g., arp.

Thanks,

JK

PS: Actually I found another bug, which was originally from Bill
Paul's code.  I need more test but I will let you know.

On Tuesday 14 October 2003 07:38 pm, Jung-uk Kim wrote:
> I thought you were going to MFC it after 4.9-RELEASE but...
>
> Any way, I think you have to mention that miivar.h has partial MFC
> from the following:
>
> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/mii/miivar.h.diff
>?r1=1.10&r2=1.11
>
> Actually I got it from NetBSD.
>
> BTW, there is a buglet in the driver with promiscuous mode. ;-)
> When the card is in promiscuous mode, trying changing any flags.
> Promiscuous mode WILL not work properly because of a bug in the
> original patch.
>
> Nathan also added checksum offloading feature recently.  I am going
> to add the feature, too.
>
> So stay tuned for more patches. ;-)
>
> Thanks,
>
> JK

--
_______________________________________________________________
Jung-uk Kim			NIKSUN, Inc.
jkim at niksun.com			http://www.niksun.com
Tel: +1 732 821-5000 x3331	1100 Cornwall Road
Fax: +1 732 821-6000		Monmouth Junction, NJ 08852 USA
_______________________________________________________________


-------------- next part --------------
A non-text attachment was scrubbed...
Name: sk-current.diff
Type: text/x-diff
Size: 3855 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20031215/91bab1b0/sk-current.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sk-stable.diff
Type: text/x-diff
Size: 3879 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20031215/91bab1b0/sk-stable.bin


More information about the freebsd-current mailing list