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: <b4242291-3476-03cc-523f-a09307dd0d08@intel.com>
Date: Mon, 12 Jun 2023 16:49:47 +0200
From: Piotr Gardocki <piotrx.gardocki@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <netdev@...r.kernel.org>, <przemyslaw.kitszel@...el.com>,
	<michal.swiatkowski@...ux.intel.com>, <pmenzel@...gen.mpg.de>,
	<maciej.fijalkowski@...el.com>, <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 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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ