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: <201103021901.39849.florian@openwrt.org>
Date:	Wed, 2 Mar 2011 19:01:39 +0100
From:	Florian Fainelli <florian@...nwrt.org>
To:	Roger Luethi <rl@...lgate.ch>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	"Alex G." <mr.nuke.me@...il.com>
Subject: Re: [PATCH] via-rhine: do not abort due to invalid MAC address

Hello,

On Wednesday 02 March 2011 17:32:33 Roger Luethi wrote:
> From: "Alex G." <mr.nuke.me@...il.com>
> 
> via-rhine drops out of the init code if the hardware provides an invalid
> MAC address. I have several reports of Rhine NICs doing just that. The
> hardware still works, though; continuing the init process gives the user a
> chance to fix the MAC address using "ifconfig ethX hw ether" which appears
> to result in a perfectly useable network adapter.
> 
> Most recent report and patch provided by Alex G.
> 
> Signed-off-by: "Alex G." <mr.nuke.me@...il.com>
> Signed-off-by: Roger Luethi <rl@...lgate.ch>
> 
> diff --git a/linux-2.6.35.11/drivers/net/via-rhine.c b/via-rhine.c
> index 4930f9d..a1189f4 100644
> --- a/linux-2.6.35.11/drivers/net/via-rhine.c
> +++ b/via-rhine.c
> @@ -766,8 +766,12 @@ static int __devinit rhine_init_one(struct pci_dev
> *pdev,
> 
>  	if (!is_valid_ether_addr(dev->perm_addr)) {
>  		rc = -EIO;
> -		printk(KERN_ERR "Invalid MAC address\n");
> -		goto err_out_unmap;
> +		printk(KERN_ERR "via-rhine: invalid MAC address: %pM. "
> +				"Use ifconfig to configure valid address.\n",
> +				dev->dev_addr);
> +		/* The device may still be used normally if a valid MAC is 
configured
> +		 * We do not consider this a fatal error, and continue 
initialization
> +		 */
>  	}

Why not generate a valid random ethernet address using random_ether_addr() 
instead?
--
Florian
--
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