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: <f77b5c89-0f3d-80f9-19f4-f82a2ebf524e@intel.com>
Date: Mon, 12 Jun 2023 18:43:01 +0200
From: Piotr Gardocki <piotrx.gardocki@...el.com>
To: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
CC: Jakub Kicinski <kuba@...nel.org>, <netdev@...r.kernel.org>,
	<przemyslaw.kitszel@...el.com>, <michal.swiatkowski@...ux.intel.com>,
	<pmenzel@...gen.mpg.de>, <anthony.l.nguyen@...el.com>,
	<simon.horman@...igine.com>, <aleksander.lobakin@...el.com>
Subject: Re: [PATCH net-next] net: add check for current MAC address in
 dev_set_mac_address

On 12.06.2023 17:37, Maciej Fijalkowski wrote:
> On Mon, Jun 12, 2023 at 04:49:47PM +0200, Piotr Gardocki wrote:
>> On 10.06.2023 08:44, Jakub Kicinski wrote:
>>> On Fri,  9 Jun 2023 18:52:41 +0200 Piotr Gardocki wrote:
>>>> +	if (ether_addr_equal(dev->dev_addr, sa->sa_data))
>>>> +		return 0;
>>>
>>> not every device is ethernet, you need to use dev->addr_len for
>>> the comparison.
>>
>> Before re-sending I just want to double check.
>> Did you mean checking if sa->sa_family == AF_LOCAL ?
>> There's no length in sockaddr.
>>
>> It would like this:
>> 	if (sa->sa_family == AF_LOCAL &&
>> 	    ether_addr_equal(dev->dev_addr, sa->sa_data))
>> 		return 0;
> 
> I believe Jakub just wanted this:
> 
> 	if (dev->addr_len)
> 		if (ether_addr_equal(dev->dev_addr, sa->sa_data))
> 			return 0;
> 
> so no clue why you want anything from sockaddr?

I understood that dev->type and dev->addr_len can just be different
than AF_LOCAL and 48 bits in this function.
Your version does not convince me, let's wait for Jakub's judgement.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ