Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci update for GCC 6:



details:   https://anonhg.NetBSD.org/src/rev/390e7b9472d8
branches:  trunk
changeset: 359364:390e7b9472d8
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Feb 08 07:53:47 2018 +0000

description:
update for GCC 6:

- fix an array bounds violation and pass the right address to ether_crc32_be().

(i assume this actually makes et(4) multicast work.)

diffstat:

 sys/dev/pci/if_et.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 487e3ccb6026 -r 390e7b9472d8 sys/dev/pci/if_et.c
--- a/sys/dev/pci/if_et.c       Thu Feb 08 07:48:19 2018 +0000
+++ b/sys/dev/pci/if_et.c       Thu Feb 08 07:53:47 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_et.c,v 1.15 2017/07/29 01:47:48 riastradh Exp $     */
+/*     $NetBSD: if_et.c,v 1.16 2018/02/08 07:53:47 mrg Exp $   */
 /*     $OpenBSD: if_et.c,v 1.11 2008/06/08 06:18:07 jsg Exp $  */
 /*
  * 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.15 2017/07/29 01:47:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.16 2018/02/08 07:53:47 mrg Exp $");
 
 #include "opt_inet.h"
 #include "vlan.h"
@@ -1224,8 +1224,7 @@
                        addr[i] &=  enm->enm_addrlo[i];
                }
 
-               h = ether_crc32_be(LLADDR((struct sockaddr_dl *)addr),
-                   ETHER_ADDR_LEN);
+               h = ether_crc32_be(addr, ETHER_ADDR_LEN);
                h = (h & 0x3f800000) >> 23;
 
                hp = &hash[0];



Home | Main Index | Thread Index | Old Index