lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1400278492-1673-2-git-send-email-denis.pithon@gmail.com>
Date:	Sat, 17 May 2014 00:14:50 +0200
From:	Denis Pithon <denis.pithon@...il.com>
To:	gregkh@...uxfoundation.org, tklauser@...tanz.ch
Cc:	himangi774@...il.com, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 2/4] staging/wlan-ng: compare using ether_addr_equal_unaligned

Replaced generic memcmp() with dedicated ether_addr_equal_unaligned()
call. I did not find any clue of u16 alignment for both addresses.

Signed-off-by: Denis Pithon <denis.pithon@...il.com>
---
 drivers/staging/wlan-ng/p80211netdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
index 64dd935..13fe068 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -263,7 +263,8 @@ static int p80211_convert_to_ether(wlandevice_t *wlandev, struct sk_buff *skb)
 	/* perform mcast filtering */
 	if (wlandev->netdev->flags & IFF_ALLMULTI) {
 		/* allow my local address through */
-		if (memcmp(hdr->a1, wlandev->netdev->dev_addr, ETH_ALEN) != 0) {
+		if (!ether_addr_equal_unaligned(wlandev->netdev->dev_addr,
+						hdr->a1)) {
 			/* but reject anything else that isn't multicast */
 			if (!(hdr->a1[0] & 0x01))
 				return CONV_TO_ETHER_SKIPPED;
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ