Use IFF_ALLMULTI correctly.
This commit is contained in:
parent
73535dd9ce
commit
c540418d24
|
@ -31,7 +31,7 @@
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)if_le.c 7.6 (Berkeley) 5/8/91
|
* from: @(#)if_le.c 7.6 (Berkeley) 5/8/91
|
||||||
* $Id: if_le.c,v 1.9 1994/02/14 23:03:54 mycroft Exp $
|
* $Id: if_le.c,v 1.10 1994/02/16 20:20:18 mycroft Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "le.h"
|
#include "le.h"
|
||||||
|
@ -212,8 +212,8 @@ leattach(hd)
|
||||||
ifp->if_ioctl = leioctl;
|
ifp->if_ioctl = leioctl;
|
||||||
ifp->if_output = ether_output;
|
ifp->if_output = ether_output;
|
||||||
ifp->if_start = lestart;
|
ifp->if_start = lestart;
|
||||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST |
|
ifp->if_flags =
|
||||||
IFF_NOTRAILERS;
|
IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
|
||||||
#if NBPFILTER > 0
|
#if NBPFILTER > 0
|
||||||
bpfattach(&sc->sc_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
|
bpfattach(&sc->sc_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
|
||||||
#endif
|
#endif
|
||||||
|
@ -225,11 +225,11 @@ leattach(hd)
|
||||||
* Set up the logical address filter
|
* Set up the logical address filter
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
lesetladrf(sc)
|
lesetladrf(ac, af)
|
||||||
struct le_softc *sc;
|
struct arpcom *ac;
|
||||||
|
u_long *af;
|
||||||
{
|
{
|
||||||
u_long *af = sc->sc_r2->ler2_ladrf;
|
struct ifnet *ifp = &ac->ac_if;
|
||||||
struct ifnet *ifp = &sc->sc_if;
|
|
||||||
struct ether_multi *enm;
|
struct ether_multi *enm;
|
||||||
register u_char *cp, c;
|
register u_char *cp, c;
|
||||||
register u_long crc;
|
register u_long crc;
|
||||||
|
@ -244,13 +244,14 @@ lesetladrf(sc)
|
||||||
* the word.
|
* the word.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (ifp->if_flags & IFF_ALLMULTI) {
|
if (ifp->if_flags & IFF_PROMISC) {
|
||||||
|
ifp->if_flags |= IFF_ALLMULTI;
|
||||||
af[0] = af[1] = 0xffffffff;
|
af[0] = af[1] = 0xffffffff;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
af[0] = af[1] = 0;
|
af[0] = af[1] = 0;
|
||||||
ETHER_FIRST_MULTI(step, &sc->sc_ac, enm);
|
ETHER_FIRST_MULTI(step, ac, enm);
|
||||||
while (enm != NULL) {
|
while (enm != NULL) {
|
||||||
if (bcmp(enm->enm_addrlo, enm->enm_addrhi,
|
if (bcmp(enm->enm_addrlo, enm->enm_addrhi,
|
||||||
sizeof(enm->enm_addrlo)) != 0) {
|
sizeof(enm->enm_addrlo)) != 0) {
|
||||||
|
@ -262,6 +263,7 @@ lesetladrf(sc)
|
||||||
* ranges is for IP multicast routing, for which the
|
* ranges is for IP multicast routing, for which the
|
||||||
* range is big enough to require all bits set.)
|
* range is big enough to require all bits set.)
|
||||||
*/
|
*/
|
||||||
|
ifp->if_flags |= IFF_ALLMULTI;
|
||||||
af[0] = af[1] = 0xffffffff;
|
af[0] = af[1] = 0xffffffff;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -287,6 +289,7 @@ lesetladrf(sc)
|
||||||
|
|
||||||
ETHER_NEXT_MULTI(step, enm);
|
ETHER_NEXT_MULTI(step, enm);
|
||||||
}
|
}
|
||||||
|
ifp->if_flags &= ~IFF_ALLMULTI;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -336,7 +339,7 @@ lereset(sc)
|
||||||
ler2->ler2_padr[3] = sc->sc_addr[2];
|
ler2->ler2_padr[3] = sc->sc_addr[2];
|
||||||
ler2->ler2_padr[4] = sc->sc_addr[5];
|
ler2->ler2_padr[4] = sc->sc_addr[5];
|
||||||
ler2->ler2_padr[5] = sc->sc_addr[4];
|
ler2->ler2_padr[5] = sc->sc_addr[4];
|
||||||
lesetladrf(sc);
|
lesetladrf(&sc->sc_arpcom, ler2->ler2_ladrf);
|
||||||
ledrinit(ler2);
|
ledrinit(ler2);
|
||||||
sc->sc_rmd = sc->sc_tmd = sc->sc_txcnt = 0;
|
sc->sc_rmd = sc->sc_tmd = sc->sc_txcnt = 0;
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* Currently supports the Western Digital/SMC 8003 and 8013 series, the 3Com
|
* Currently supports the Western Digital/SMC 8003 and 8013 series, the 3Com
|
||||||
* 3c503, the NE1000 and NE2000, and a variety of similar clones.
|
* 3c503, the NE1000 and NE2000, and a variety of similar clones.
|
||||||
*
|
*
|
||||||
* $Id: if_ed.c,v 1.28 1994/02/16 03:03:46 mycroft Exp $
|
* $Id: if_ed.c,v 1.29 1994/02/16 20:15:18 mycroft Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ed.h"
|
#include "ed.h"
|
||||||
|
@ -2318,7 +2318,8 @@ ed_getmcaf(ac, af)
|
||||||
* the word.
|
* the word.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) {
|
if (ifp->if_flags & IFF_PROMISC)) {
|
||||||
|
ifp->if_flags |= IFF_ALLMULTI;
|
||||||
af[0] = af[1] = 0xffffffff;
|
af[0] = af[1] = 0xffffffff;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2336,6 +2337,7 @@ ed_getmcaf(ac, af)
|
||||||
* ranges is for IP multicast routing, for which the
|
* ranges is for IP multicast routing, for which the
|
||||||
* range is big enough to require all bits set.)
|
* range is big enough to require all bits set.)
|
||||||
*/
|
*/
|
||||||
|
ifp->if_flags |= IFF_ALLMULTI;
|
||||||
af[0] = af[1] = 0xffffffff;
|
af[0] = af[1] = 0xffffffff;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2361,4 +2363,5 @@ ed_getmcaf(ac, af)
|
||||||
|
|
||||||
ETHER_NEXT_MULTI(step, enm);
|
ETHER_NEXT_MULTI(step, enm);
|
||||||
}
|
}
|
||||||
|
ifp->if_flags &= ~IFF_ALLMULTI;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
* of this software, nor does the author assume any responsibility
|
* of this software, nor does the author assume any responsibility
|
||||||
* for damages incurred with its use.
|
* for damages incurred with its use.
|
||||||
*
|
*
|
||||||
* $Id: if_is.c,v 1.21 1994/02/15 19:53:20 mycroft Exp $
|
* $Id: if_is.c,v 1.22 1994/02/16 20:15:22 mycroft Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* TODO
|
/* TODO
|
||||||
|
@ -1149,7 +1149,8 @@ is_setladrf(ac, af)
|
||||||
* the word.
|
* the word.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) {
|
if (ifp->if_flags & IFF_PROMISC)) {
|
||||||
|
ifp->if_flags |= IFF_ALLMULTI;
|
||||||
af[0] = af[1] = 0xffffffff;
|
af[0] = af[1] = 0xffffffff;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1167,6 +1168,7 @@ is_setladrf(ac, af)
|
||||||
* ranges is for IP multicast routing, for which the
|
* ranges is for IP multicast routing, for which the
|
||||||
* range is big enough to require all bits set.)
|
* range is big enough to require all bits set.)
|
||||||
*/
|
*/
|
||||||
|
ifp->if_flags |= IFF_ALLMULTI;
|
||||||
af[0] = af[1] = 0xffffffff;
|
af[0] = af[1] = 0xffffffff;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1192,5 +1194,6 @@ is_setladrf(ac, af)
|
||||||
|
|
||||||
ETHER_NEXT_MULTI(step, enm);
|
ETHER_NEXT_MULTI(step, enm);
|
||||||
}
|
}
|
||||||
|
ifp->if_flags &= ~IFF_ALLMULTI;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* Currently supports the Western Digital/SMC 8003 and 8013 series, the 3Com
|
* Currently supports the Western Digital/SMC 8003 and 8013 series, the 3Com
|
||||||
* 3c503, the NE1000 and NE2000, and a variety of similar clones.
|
* 3c503, the NE1000 and NE2000, and a variety of similar clones.
|
||||||
*
|
*
|
||||||
* $Id: if_ed.c,v 1.28 1994/02/16 03:03:46 mycroft Exp $
|
* $Id: if_ed.c,v 1.29 1994/02/16 20:15:18 mycroft Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ed.h"
|
#include "ed.h"
|
||||||
|
@ -2318,7 +2318,8 @@ ed_getmcaf(ac, af)
|
||||||
* the word.
|
* the word.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) {
|
if (ifp->if_flags & IFF_PROMISC)) {
|
||||||
|
ifp->if_flags |= IFF_ALLMULTI;
|
||||||
af[0] = af[1] = 0xffffffff;
|
af[0] = af[1] = 0xffffffff;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2336,6 +2337,7 @@ ed_getmcaf(ac, af)
|
||||||
* ranges is for IP multicast routing, for which the
|
* ranges is for IP multicast routing, for which the
|
||||||
* range is big enough to require all bits set.)
|
* range is big enough to require all bits set.)
|
||||||
*/
|
*/
|
||||||
|
ifp->if_flags |= IFF_ALLMULTI;
|
||||||
af[0] = af[1] = 0xffffffff;
|
af[0] = af[1] = 0xffffffff;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2361,4 +2363,5 @@ ed_getmcaf(ac, af)
|
||||||
|
|
||||||
ETHER_NEXT_MULTI(step, enm);
|
ETHER_NEXT_MULTI(step, enm);
|
||||||
}
|
}
|
||||||
|
ifp->if_flags &= ~IFF_ALLMULTI;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue