From: Jakub Kicinski <kuba@kernel.org>
To: Piotr Gardocki <piotrx.gardocki@intel.com>
Cc: Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
<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 10:39:01 -0700 [thread overview]
Message-ID: <20230612103901.06efe4d6@kernel.org> (raw)
In-Reply-To: <f77b5c89-0f3d-80f9-19f4-f82a2ebf524e@intel.com>
On Mon, 12 Jun 2023 18:43:01 +0200 Piotr Gardocki wrote:
> On 12.06.2023 17:37, Maciej Fijalkowski wrote:
> > On Mon, Jun 12, 2023 at 04:49:47PM +0200, Piotr Gardocki wrote:
> >> 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.
I'm probably missing something because I'm not sure where
the discussion about AF_LOCAL came from. All I meant is:
if (!memcmp(dev->dev_addr, sa->sa_data, dev->addr_len))
return 0;
prev parent reply other threads:[~2023-06-12 17:39 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
2023-06-12 16:43 ` Piotr Gardocki
2023-06-12 17:39 ` Jakub Kicinski [this message]
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=20230612103901.06efe4d6@kernel.org \
--to=kuba@kernel.org \
--cc=aleksander.lobakin@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=maciej.fijalkowski@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).