From f60b3112d619fb67fdd055e0ce769814fc9b75e9 Mon Sep 17 00:00:00 2001 From: Christian Weisgerber Date: Thu, 13 Jul 2017 17:44:37 +0000 Subject: Fix multicast reception: use unsigned chars to avoid accidental sign extension in hash calculation. Reported & diagnosed by Nick Briggs. ok mpi@ --- sys/dev/pci/if_tl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') 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; -- cgit v1.2.3