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: <874nv07au1.fsf@nemi.mork.no>
Date:	Thu, 09 Feb 2012 07:57:42 +0100
From:	Bjørn Mork <bjorn@...k.no>
To:	Oliver Neukum <oliver@...kum.org>
Cc:	Danny Kukawka <danny.kukawka@...ect.de>,
	Danny Kukawka <dkukawka@...e.de>,
	"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 37/50] usbnet: set addr_assign_type if random_ether_addr() used

Oliver Neukum <oliver@...kum.org> writes:

> Am Mittwoch, 8. Februar 2012, 22:10:44 schrieb Danny Kukawka:
>> Set addr_assign_type correctly to NET_ADDR_RANDOM in case
>> a random MAC address was generated and assigned to the netdevice.
>> 
>> Signed-off-by: Danny Kukawka <danny.kukawka@...ect.de>
>> ---
>>  drivers/net/usb/usbnet.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>> 
>> diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
>> index fae0fbd..7bd07d7 100644
>> --- a/drivers/net/usb/usbnet.c
>> +++ b/drivers/net/usb/usbnet.c
>> @@ -1365,6 +1365,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
>>  	dev->net = net;
>>  	strcpy (net->name, "usb%d");
>>  	memcpy (net->dev_addr, node_id, sizeof node_id);
>> +	net->addr_assign_type |= NET_ADDR_RANDOM;
>>  
>>  	/* rx and tx sides can use different message sizes;
>>  	 * bind() should set rx_urb_size in that case.
>
> Don't you set the flag too early here? By that time we don't know
> whether the device provides a real MAC, do we?

Maybe it makes sense to set it here anyway since usbnet provides this
default random address, and let the minidrivers which set a real mac
also clear the flag?  But in that case the patch need to clear the flag
everywhere a minidriver currently updates the address.


Bjørn
--
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