Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix a bug that multicast address filter doesn't ...
details: https://anonhg.NetBSD.org/src/rev/c6a2de3f633f
branches: trunk
changeset: 455253:c6a2de3f633f
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Sat Oct 12 06:00:52 2019 +0000
description:
Fix a bug that multicast address filter doesn't work correctly.
XXX pullup-[789].
diffstat:
sys/dev/pci/if_et.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
diffs (47 lines):
diff -r e4db6145f30e -r c6a2de3f633f sys/dev/pci/if_et.c
--- a/sys/dev/pci/if_et.c Sat Oct 12 05:19:49 2019 +0000
+++ b/sys/dev/pci/if_et.c Sat Oct 12 06:00:52 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_et.c,v 1.26 2019/08/01 13:36:37 msaitoh Exp $ */
+/* $NetBSD: if_et.c,v 1.27 2019/10/12 06:00:52 msaitoh Exp $ */
/* $OpenBSD: if_et.c,v 1.12 2008/07/11 09:29:02 kevlo $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.26 2019/08/01 13:36:37 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.27 2019/10/12 06:00:52 msaitoh Exp $");
#include "opt_inet.h"
#include "vlan.h"
@@ -1304,7 +1304,6 @@
uint32_t rxmac_ctrl, pktfilt;
struct ether_multi *enm;
struct ether_multistep step;
- uint8_t addr[ETHER_ADDR_LEN];
int i, count;
pktfilt = CSR_READ_4(sc, ET_PKTFILT);
@@ -1316,19 +1315,13 @@
goto back;
}
- bcopy(etherbroadcastaddr, addr, ETHER_ADDR_LEN);
-
count = 0;
ETHER_LOCK(ec);
ETHER_FIRST_MULTI(step, ec, enm);
while (enm != NULL) {
uint32_t *hp, h;
- for (i = 0; i < ETHER_ADDR_LEN; i++) {
- addr[i] &= enm->enm_addrlo[i];
- }
-
- h = ether_crc32_be(addr, ETHER_ADDR_LEN);
+ h = ether_crc32_be(enm->enm_addrlo, ETHER_ADDR_LEN);
h = (h & 0x3f800000) >> 23;
hp = &hash[0];
Home |
Main Index |
Thread Index |
Old Index