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>] [day] [month] [year] [list]
Message-ID: <1261164833943@kroah.org>
Date:	Fri, 18 Dec 2009 11:33:53 -0800
From:	<gregkh@...e.de>
To:	randy.dunlap@...cle.com, gregkh@...e.de,
	linux-kernel@...r.kernel.org, sfr@...b.auug.org.au
Subject: patch staging-slicoss-use-compare_ether_addr.patch added to gregkh-2.6 tree


This is a note to let you know that I've just added the patch titled

    Subject: staging: slicoss Use compare_ether_addr.

to my gregkh-2.6 tree.  Its filename is

    staging-slicoss-use-compare_ether_addr.patch

This tree can be found at 
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


>From kirjanov@...il.com  Fri Dec 18 10:34:17 2009
From: "Denis Kirjanov <kirjanov@...il.com" <kirjanov@...il.com>
Date: Fri, 18 Dec 2009 11:00:19 +0300
Subject: staging: slicoss Use compare_ether_addr.
To: gregkh@...e.de, liodot@...il.com, charrer@...critech.com
Cc: devel@...uxdriverproject.org
Message-ID: <20091218080019.GA4531@...dcone>
Content-Disposition: inline


Use compare_ether_addr.

Signed-off-by: Denis Kirjanov <kirjanov@...il.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>


---
 drivers/staging/slicoss/slic.h    |    9 ---------
 drivers/staging/slicoss/slicoss.c |   11 +++--------
 2 files changed, 3 insertions(+), 17 deletions(-)

--- a/drivers/staging/slicoss/slic.h
+++ b/drivers/staging/slicoss/slic.h
@@ -527,15 +527,6 @@ struct adapter {
     (largestat) += ((newstat) - (oldstat));                              \
 }
 
-#define ETHER_EQ_ADDR(_AddrA, _AddrB, _Result)                           \
-{                                                                        \
-    _Result = true;                                                      \
-    if (*(u32 *)(_AddrA) != *(u32 *)(_AddrB))                          \
-	_Result = false;                                                 \
-    if (*(u16 *)(&((_AddrA)[4])) != *(u16 *)(&((_AddrB)[4])))        \
-	_Result = false;                                                 \
-}
-
 #if defined(CONFIG_X86_64) || defined(CONFIG_IA64)
 #define   SLIC_GET_ADDR_LOW(_addr)  (u32)((u64)(_addr) & \
 	0x00000000FFFFFFFF)
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -1249,13 +1249,11 @@ static struct net_device_stats *slic_get
 static int slic_mcast_add_list(struct adapter *adapter, char *address)
 {
 	struct mcast_address *mcaddr, *mlist;
-	bool equaladdr;
 
 	/* Check to see if it already exists */
 	mlist = adapter->mcastaddrs;
 	while (mlist) {
-		ETHER_EQ_ADDR(mlist->address, address, equaladdr);
-		if (equaladdr)
+		if (!compare_ether_addr(mlist->address, address))
 			return STATUS_SUCCESS;
 		mlist = mlist->next;
 	}
@@ -2469,7 +2467,6 @@ static bool slic_mac_filter(struct adapt
 	u32 opts = adapter->macopts;
 	u32 *dhost4 = (u32 *)&ether_frame->ether_dhost[0];
 	u16 *dhost2 = (u16 *)&ether_frame->ether_dhost[4];
-	bool equaladdr;
 
 	if (opts & MAC_PROMISC)
 		return true;
@@ -2493,10 +2490,8 @@ static bool slic_mac_filter(struct adapt
 			struct mcast_address *mcaddr = adapter->mcastaddrs;
 
 			while (mcaddr) {
-				ETHER_EQ_ADDR(mcaddr->address,
-					      ether_frame->ether_dhost,
-					      equaladdr);
-				if (equaladdr) {
+				if (!compare_ether_addr(mcaddr->address,
+							ether_frame->ether_dhost)) {
 					adapter->rcv_multicasts++;
 					adapter->stats.multicast++;
 					return true;

--
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