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: <20090106.105226.58880881.davem@davemloft.net>
Date:	Tue, 06 Jan 2009 10:52:26 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	bhutchings@...arflare.com
Cc:	jacmet@...site.dk, wfg@...ux.intel.com, netdev@...r.kernel.org
Subject: Re: [PATCH] dm9601: warn on invalid mac address

From: Ben Hutchings <bhutchings@...arflare.com>
Date: Tue, 06 Jan 2009 11:52:35 +0000

> On Tue, 2009-01-06 at 10:18 +0100, Peter Korsgaard wrote:
> > >>>>> "Wu" == Wu Fengguang <wfg@...ux.intel.com> writes:
> > 
> > Hi,
> > 
> >  Wu> Add warnings on invalid mac address to help disclose/debug problems.
> >  Wu> Signed-off-by: Wu Fengguang <fengguang.wu@...el.com>
> >  Wu> ---
> >  Wu>  drivers/net/usb/dm9601.c |   12 +++++++++++-
> >  Wu>  1 file changed, 11 insertions(+), 1 deletion(-)
> > 
> >  Wu> --- linux-2.6.orig/drivers/net/usb/dm9601.c
> >  Wu> +++ linux-2.6/drivers/net/usb/dm9601.c
> >  Wu> @@ -401,8 +401,12 @@ static int dm9601_set_mac_address(struct
> >  Wu>  	struct sockaddr *addr = p;
> >  Wu>  	struct usbnet *dev = netdev_priv(net);
> >  
> >  Wu> -	if (!is_valid_ether_addr(addr->sa_data))
> >  Wu> +	if (!is_valid_ether_addr(addr->sa_data)) {
> >  Wu> +		DECLARE_MAC_BUF(mac_buf);
> >  Wu> +		print_mac(mac_buf, addr->sa_data);
> >  Wu> +		dev_warn(&net->dev, "not setting invalid mac address %s\n", mac_buf);
> > 
> > This should be an error and not a warning.
> > Notice that print_mac returns the string, so you can do:
> > 
> > dev_err(&net->dev, "... %s", print_mac(mac_buf, addr->sa_data));
> 
> print_mac() is already obsolete; use %pM in the format string instead.

Yep, please fix this.
--
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