All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Eric Dumazet <edumazet@kernel.org>,
	 "David S . Miller" <davem@davemloft.net>,
	 Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>
Cc: Willem de Bruijn <willemb@google.com>,
	 Simon Horman <horms@kernel.org>,
	 netdev@vger.kernel.org,  edumazet@kernel.org,
	 Henry Martin <bsdhenrymartin@gmail.com>,
	 Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	 Jason Wang <jasowangio@gmail.com>,
	 Andrew Lunn <andrew+netdev@lunn.ch>
Subject: Re: [PATCH net] tun: flush uc and mc addresses in TUNSETLINK
Date: Wed, 18 Nov 2026 18:47:41 -0500	[thread overview]
Message-ID: <willemdebruijn.kernel.2a3141d1dd915@gmail.com> (raw)
In-Reply-To: <20261118125443.1137177-1-edumazet@kernel.org>

Eric Dumazet wrote:
> TUNSETLINK changes dev->type and dev->addr_len, but leaves
> dev->uc and dev->mc untouched.
> 
> Entries added with the old addr_len stay in lists and rb-trees
> that are now searched and dumped with the new addr_len.
> 
> When addr_len grows (eg ARPHRD_NONE -> ARPHRD_IP6GRE), dumps like
> /proc/net/dev_mcast and RTM_GETMULTICAST expose bytes of
> netdev_hw_addr that were never initialized.
> 
> bonding and team already call dev_uc_flush() and dev_mc_flush()
> between NETDEV_PRE_TYPE_CHANGE and the type change. Do the same
> in tun, but only when addr_len changes: if it does not, existing
> entries are still valid and there is no reason to drop them.
> 
> Fixes: cca8ea3b05c9 ("net: tun: set tun->dev->addr_len during TUNSETLINK processing")
> Link: https://lore.kernel.org/netdev/20261116024056.1274402-1-bsdhenrymartin@gmail.com/
> Signed-off-by: Eric Dumazet <edumazet@kernel.org>

Reviewed-by: Willem de Bruijn <willemb@google.com>

  parent reply	other threads:[~2026-11-18 23:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 12:54 [PATCH net] tun: flush uc and mc addresses in TUNSETLINK Eric Dumazet
2026-11-18 12:58 ` netdev-bot+sinfo
2026-11-19  8:34   ` Eric Dumazet
2026-11-18 23:47 ` Willem de Bruijn [this message]
2026-11-19 22:17 ` netdev-bot+sashiko

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=willemdebruijn.kernel.2a3141d1dd915@gmail.com \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bsdhenrymartin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=jasowangio@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.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.