summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authornp <np@FreeBSD.org>2015-05-03 08:17:37 +0000
committernp <np@FreeBSD.org>2015-05-03 08:17:37 +0000
commit6095111181691ff835322b5df96307ca1003ad24 (patch)
tree5c0b37200ecccb725e543633bd0b39eb6ae7b925 /sys/dev
parentf8c0ace4a438e015e987685a71e81a966baa7b1d (diff)
downloadFreeBSD-src-6095111181691ff835322b5df96307ca1003ad24.zip
FreeBSD-src-6095111181691ff835322b5df96307ca1003ad24.tar.gz
MFC r272051:
cxgbe(4): Verify that the addresses in if_multiaddrs really are multicast addresses. (The chip doesn't really care, it's just that it needs to be told explicitly if unicast DMACs are checked for "hits" in the hash that is used after the TCAM entries are all used up).
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/cxgbe/t4_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 513b94c..91b37b1 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -2994,8 +2994,10 @@ update_mac_settings(struct ifnet *ifp, int flags)
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_LINK)
continue;
- mcaddr[i++] =
+ mcaddr[i] =
LLADDR((struct sockaddr_dl *)ifma->ifma_addr);
+ MPASS(ETHER_IS_MULTICAST(mcaddr[i]));
+ i++;
if (i == FW_MAC_EXACT_CHUNK) {
rc = t4_alloc_mac_filt(sc, sc->mbox, viid, del,
OpenPOWER on IntegriCloud