netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guillaume Nault <gnault@redhat.com>
To: Emanuele Santini <emanuele.santini.88@gmail.com>
Cc: netdev@vger.kernel.org, yoshfuji@linux-ipv6.org,
	friedrich@oslage.de, kuba@kernel.org, davem@davemloft.net,
	pabeni@redhat.com, dsahern@kernel.org
Subject: Re: [PATCH] net: ipv6: fix the address length for net_device on a GRE tunnel
Date: Fri, 8 Nov 2024 17:17:12 +0100	[thread overview]
Message-ID: <Zy45iLv7cL8OcYze@debian> (raw)
In-Reply-To: <Zy4fA07kgV3o4Xmn@emanuele-al>

On Fri, Nov 08, 2024 at 03:24:03PM +0100, Emanuele Santini wrote:
> I'm talking about the ip6gre. I agree that setting the hardware address to 0 is appropriate.
> However, in the ip6gre_tunnel_setup function, the perm_addr field of net_device is 
> currently assigned a random Ethernet address:
> 
>         dev->flags |= IFF_NOARP;
>        - dev->addr_len = sizeof(struct in6_addr);
>        + dev->addr_len = ETH_ALEN;
>         netif_keep_dst(dev);
>         /* This perm addr will be used as interface identifier by IPv6 */
>         dev->addr_assign_type = NET_ADDR_RANDOM;
>         eth_random_addr(dev->perm_addr);
> 
> maybe this is not a valid justification to set addr_len to ETH_ALEN.

I think that having a fake permanent address for the purpose of IPv6
interface Id. generation isn't a correct justification for setting
dev->addr_len.

If setting ->perm_addr and ->addr_assign_type have side effects on the
acceptable values of ->addr_len, then the commit description should
explain that in more details.

> I will make a review setting addr_len to 0, and will resubmit the patch after successful testing.

Thanks.


  reply	other threads:[~2024-11-08 16:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08  9:25 [PATCH] net: ipv6: fix the address length for net_device on a GRE tunnel Emanuele Santini
2024-11-08 12:08 ` Guillaume Nault
2024-11-08 14:24   ` Emanuele Santini
2024-11-08 16:17     ` Guillaume Nault [this message]
2024-12-18 10:52       ` Emanuele Santini

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=Zy45iLv7cL8OcYze@debian \
    --to=gnault@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=emanuele.santini.88@gmail.com \
    --cc=friedrich@oslage.de \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yoshfuji@linux-ipv6.org \
    /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).