Here is a diff for ale(4) to rewrite bits of the multicast handling
code as it should be. The handling of the IFF_ALLMULTI flag is wrong
and the bcmp based range checking shouldn't be there.

Please test multicast operation. Please send a dmesg.


index: if_ale.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_ale.c,v
retrieving revision 1.4
diff -u -p -r1.4 if_ale.c
--- if_ale.c    29 Mar 2009 21:53:52 -0000      1.4
+++ if_ale.c    4 Jun 2009 09:01:19 -0000
@@ -2013,15 +2025,15 @@ ale_rxfilter(struct ale_softc *sc)
 
        rxcfg = CSR_READ_4(sc, ALE_MAC_CFG);
        rxcfg &= ~(MAC_CFG_ALLMULTI | MAC_CFG_BCAST | MAC_CFG_PROMISC);
+       ifp->if_flags &= ~IFF_ALLMULTI;
 
        /*
         * Always accept broadcast frames.
         */
        rxcfg |= MAC_CFG_BCAST;
 
-       if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC || 
-           ac->ac_multirangecnt > 0) {
-allmulti:
+       if (ifp->if_flags & IFF_PROMISC || ac->ac_multirangecnt > 0) {
+               ifp->if_flags |= IFF_ALLMULTI;
                if (ifp->if_flags & IFF_PROMISC)
                        rxcfg |= MAC_CFG_PROMISC;
                else
@@ -2033,14 +2045,10 @@ allmulti:
 
                ETHER_FIRST_MULTI(step, ac, enm);
                while (enm != NULL) {
-                       if (bcmp(enm->enm_addrlo, enm->enm_addrhi,
-                           ETHER_ADDR_LEN)) {
-                               ifp->if_flags |= IFF_ALLMULTI;
-                               goto allmulti;
-                       }
                        crc = ether_crc32_le(enm->enm_addrlo, ETHER_ADDR_LEN);
 
                        mchash[crc >> 31] |= 1 << ((crc >> 26) & 0x1f);
+
                        ETHER_NEXT_MULTI(step, enm);
                }
        }

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to