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] [day] [month] [year] [list]
Message-ID: <20090112082310.56a9253a@extreme>
Date:	Mon, 12 Jan 2009 08:23:10 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Daniele Venzano <venza@...wnhat.org>
Cc:	netdev@...r.kernel.org, akpm@...ux-foundation.org,
	venza@...wnhat.org
Subject: Re: [PATCH] SIS900 show warning if bogus MAC address

On Sun, 11 Jan 2009 09:45:04 +0100
Daniele Venzano <venza@...wnhat.org> wrote:

> The attached patch modifies the sis900 driver to show a warning at boot
> or module load time to show a message when a null MAC address
> (00:00:00:00:00:00) is read from the the hardware.
> This seems to happen with newer usage of the sis900 chipset, since this
> never came up before.
> 
> Signed-off-by: Daniele Venzano <venza@...wnhat.org>
> 
> --
> Daniele Venzano
> http://www.brownhat.org
> 
 /**
+ *      sis900_check_mac_addr - Check the MAc adress for validity
+ *	@net_dev: the net device that has the address to check
+ *
+ * 	Return false (0) if the mac address read from the hardware is
+ * 	composed of all zeros.
+ */
+
+static int __devinit sis900_check_mac_addr(struct net_device *net_dev)
+{
+	int i;
+
+	for (i = 0; i < 6; i++)
+		if (net_dev->dev_addr[i] != 0)
+			return 1;
+
+	return 0;
+}
+

This is a reimplementation of:
        return !is_zero_ether_addr(net_dev->dev_addr);

You probably want to use is_valid_ether_addr() instead.
--
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