All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Piotr Gardocki <piotrx.gardocki@intel.com>
Cc: Jakub Kicinski <kuba@kernel.org>, <netdev@vger.kernel.org>,
	<przemyslaw.kitszel@intel.com>,
	<michal.swiatkowski@linux.intel.com>, <pmenzel@molgen.mpg.de>,
	<anthony.l.nguyen@intel.com>, <simon.horman@corigine.com>,
	<aleksander.lobakin@intel.com>
Subject: Re: [PATCH net-next] net: add check for current MAC address in dev_set_mac_address
Date: Mon, 12 Jun 2023 17:37:47 +0200	[thread overview]
Message-ID: <ZIc7y9PdEdyCBb9r@boxer> (raw)
In-Reply-To: <b4242291-3476-03cc-523f-a09307dd0d08@intel.com>

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?

  reply	other threads:[~2023-06-12 15:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 16:52 [PATCH net-next] net: add check for current MAC address in dev_set_mac_address Piotr Gardocki
2023-06-09 17:00 ` Maciej Fijalkowski
2023-06-09 17:11   ` Piotr Gardocki
2023-06-10  6:44 ` Jakub Kicinski
2023-06-12 14:49   ` Piotr Gardocki
2023-06-12 15:37     ` Maciej Fijalkowski [this message]
2023-06-12 16:43       ` Piotr Gardocki
2023-06-12 17:39         ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZIc7y9PdEdyCBb9r@boxer \
    --to=maciej.fijalkowski@intel.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=kuba@kernel.org \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=piotrx.gardocki@intel.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=simon.horman@corigine.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.