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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <47e76799.1cef600a.7b83.6fea@mx.google.com>
Date:	Mon, 24 Mar 2008 17:34:30 +0900
From:	joonwpark81@...il.com
To:	acme@...stprotocols.net
Cc:	Joonwoo Park <joonwpark81@...il.com>, netdev@...r.kernel.org
Subject: [PATCH 3/3] [LLC]: zero station mac source address

From: Joonwoo Park <joonwpark81@...il.com>

The right next device of the lo can have zero dev_addr. e.g. bonding.

Signed-off-by: Joonwoo Park <joonwpark81@...il.com>
---
 net/llc/llc_core.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/llc/llc_core.c b/net/llc/llc_core.c
index 248b590..b871e10 100644
--- a/net/llc/llc_core.c
+++ b/net/llc/llc_core.c
@@ -19,6 +19,7 @@
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/init.h>
+#include <linux/etherdevice.h>
 #include <net/net_namespace.h>
 #include <net/llc.h>
 
@@ -164,8 +165,9 @@ static int __init llc_init(void)
 	struct net_device *dev;
 
 	dev = first_net_device(&init_net);
-	if (dev != NULL)
+	do {
 		dev = next_net_device(dev);
+	} while (dev && is_zero_ether_addr(dev->dev_addr));
 
 	if (dev != NULL)
 		memcpy(llc_station_mac_sa, dev->dev_addr, ETH_ALEN);
-- 
1.5.4.3

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ