summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2017-07-13 17:44:37 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2017-07-13 17:44:37 +0000
commitf60b3112d619fb67fdd055e0ce769814fc9b75e9 (patch)
treec935852912ce7a6149caf6b84b68462835a9a8df /sys/dev
parentbb368a855763556944a15c2e81965d7145b0ddeb (diff)
Fix multicast reception: use unsigned chars to avoid accidental sign
extension in hash calculation. Reported & diagnosed by Nick Briggs. ok mpi@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_tl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c
index c70443c1b8b..7607cf4d489 100644
--- a/sys/dev/pci/if_tl.c
+++ b/sys/dev/pci/if_tl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tl.c,v 1.70 2017/01/22 10:17:38 dlg Exp $ */
+/* $OpenBSD: if_tl.c,v 1.71 2017/07/13 17:44:36 naddy Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -272,7 +272,7 @@ void tl_miibus_writereg(struct device *, int, int, int);
void tl_miibus_statchg(struct device *);
void tl_setmode(struct tl_softc *, uint64_t);
-int tl_calchash(caddr_t);
+int tl_calchash(u_int8_t *);
void tl_iff(struct tl_softc *);
void tl_setfilt(struct tl_softc *, caddr_t, int);
void tl_softreset(struct tl_softc *, int);
@@ -747,7 +747,7 @@ tl_setmode(struct tl_softc *sc, uint64_t media)
* the folded 24-bit value is split into 6-bit portions and XOR'd.
*/
int
-tl_calchash(caddr_t addr)
+tl_calchash(u_int8_t *addr)
{
int t;