From aswan@ffnet.com  Thu Jul 13 20:02:02 2000
Return-Path: <aswan@ffnet.com>
Received: from ffnet.com (w200.z208176006.sjc-ca.dsl.cnc.net [208.176.6.200])
	by hub.freebsd.org (Postfix) with ESMTP id 665ED37BB53
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Jul 2000 20:01:56 -0700 (PDT)
	(envelope-from aswan@ffnet.com)
Received: from geary.ffnet.com (geary.ffnet.com [172.16.248.55])
	by ffnet.com (8.8.8/8.8.8) with ESMTP id UAA18877;
	Thu, 13 Jul 2000 20:01:23 -0700 (PDT)
	(envelope-from aswan)
Received: (from aswan@localhost)
	by geary.ffnet.com (8.9.3/8.8.8) id UAA47055;
	Thu, 13 Jul 2000 20:01:17 -0700 (PDT)
	(envelope-from aswan)
Message-Id: <200007140301.UAA47055@geary.ffnet.com>
Date: Thu, 13 Jul 2000 20:01:17 -0700 (PDT)
From: Andrew Swan <aswan@ffnet.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: wpaul@ctr.columbia.edu
Subject: sf driver doesn't handle ALLMULTI in SIFFLAGS
X-Send-Pr-Version: 3.2

>Number:         19904
>Category:       kern
>Synopsis:       sf driver doesn't handle ALLMULTI in SIFFLAGS
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    wpaul
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 13 20:10:01 PDT 2000
>Closed-Date:    Fri Jul 14 12:13:17 PDT 2000
>Last-Modified:  Fri Jul 14 12:14:33 PDT 2000
>Originator:     Andrew Swan
>Release:        FreeBSD 3.3-RELEASE i386
>Organization:
FastForward Networks, Inc.
>Environment:

	sf driver (Adaptec "Starfire" 10/100 PCI ethernet controller)

>Description:

	When the IFF_ALLMULTI flag is set on an sf interface and
	then the SIFFLAGS ioctl is invoked, the card is not properly
	programmed to receive all multicasts.

>How-To-Repeat:

	Run mrouted with a vif configured on a physical sf interface
	and source traffic on that interface -- it will not be
	properly forwarded.

>Fix:
	
	This patch is for version 1.2.2.2 of if_sf.c (from 3.3-RELEASE)
	I don't have any newer installation locally to test on.

--- if_sf.c     1999/10/14 00:51:23     1.1.1.1
+++ if_sf.c     2000/07/14 02:44:48
@@ -1479,6 +1479,13 @@
                SF_CLRBIT(sc, SF_RXFILT, SF_RXFILT_BROAD);
        }
 
+       /* Dow we want all multicasts?  (e.g., multicast routing) */
+       if (ifp->if_flags & IFF_ALLMULTI) {
+               SF_SETBIT(sc, SF_RXFILT, SF_RXFILT_ALLMULTI);
+       } else {
+               SF_CLRBIT(sc, SF_RXFILT, SF_RXFILT_ALLMULTI);
+       }
+
        /* Init the completion queue indexes */
        csr_write_4(sc, SF_CQ_CONSIDX, 0);
        csr_write_4(sc, SF_CQ_PRODIDX, 0);


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->wpaul 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Fri Jul 14 07:28:42 PDT 2000 
Responsible-Changed-Why:  
Bill, this one includes a patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19904 
State-Changed-From-To: open->closed 
State-Changed-By: wpaul 
State-Changed-When: Fri Jul 14 12:13:17 PDT 2000 
State-Changed-Why:  
For some reason, I forgot to add a call to sf_setmulti() to sf_init(), 
so the multicast filter wasn't being configured correctly when the 
interface was brought up. Fixed in -current and -stable. 

-Bill 

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