All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Ido Schimmel <idosch@nvidia.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@kernel.org, horms@kernel.org
Subject: Re: [PATCH net-next] ipv6: Do not keep loopback addresses when MTU is below minimum
Date: Wed, 25 Nov 2026 08:04:27 -0700	[thread overview]
Message-ID: <4a5e2005-a30f-4687-ba42-6e30b2c63fcf@kernel.org> (raw)
In-Reply-To: <20261125111709.126901-1-idosch@nvidia.com>

On 11/25/26 4:17 AM, Ido Schimmel wrote:
> When the MTU of a device drops below the minimum IPv6 MTU (1280),
> addrconf_ifdown() is called to stop IPv6 on the device. For all devices
> other than loopback, the IPv6 configuration is destroyed together with
> all the addresses. For the loopback device, the configuration is
> retained and so are permanent addresses if keep_addr_on_down is set, but
> their host routes are deleted.
> 
> This results in an up device with addresses that do not have host
> routes, a state that persists even after the MTU is raised and that the
> kernel warns about when DAD completes for such an address:
> 
>  IPv6: BUG: Address 2001::fb on device lo is missing its host route.
> 
> IPv6 cannot operate below the minimum MTU, so there is no point in
> keeping the addresses. Do not keep them, similar to when IPv6 is
> disabled via disable_ipv6. This aligns the loopback device with other
> devices and with IPv4, where all the addresses are flushed when the MTU
> drops below the minimum IPv4 MTU (68).
> 
> Before:
> 
>  # sysctl -wq net.ipv6.conf.lo.keep_addr_on_down=1
>  # ip -6 address add 2001:db8:1::1/64 dev lo
>  # ip link set dev lo mtu 1000
>  # ip -6 address show dev lo
>  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 1000 qdisc noqueue state UNKNOWN group default qlen 1000
>      inet6 2001:db8:1::1/64 scope global tentative
>         valid_lft forever preferred_lft forever
>  # ip -6 route show table local dev lo
>  #
> 
> After:
> 
>  # sysctl -wq net.ipv6.conf.lo.keep_addr_on_down=1
>  # ip -6 address add 2001:db8:1::1/64 dev lo
>  # ip link set dev lo mtu 1000
>  # ip -6 address show dev lo
>  #
> 
> Other devices (before and after):
> 
>  # ip link add name dummy1 up type dummy
>  # sysctl -wq net.ipv6.conf.dummy1.keep_addr_on_down=1
>  # ip -6 address add 2001:db8:2::1/64 dev dummy1
>  # ip link set dev dummy1 mtu 1000
>  # ip -6 address show dev dummy1
>  #
> 
> IPv4 (before and after):
> 
>  # ip -4 address add 192.0.2.1/32 dev lo
>  # ip link set dev lo mtu 67
>  # ip -4 address show dev lo
>  #
> 
> Reported-by: syzbot+ded267b328e950a7c0c4@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=ded267b328e950a7c0c4
> Reported-by: syzbot+57f410c9a4f8d7a441d6@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=57f410c9a4f8d7a441d6
> Reported-by: syzbot+af16ddc8fd22a1d135f8@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=af16ddc8fd22a1d135f8
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> ---
> 
> Notes:
>     Targeted at net-next without a Fixes tag as this is not a regression:
>     the loopback device has been keeping its addresses without host routes
>     when its MTU drops below IPV6_MIN_MTU ever since keep_addr_on_down was
>     introduced in v4.6. The only symptom is a pr_warn() message (not a
>     WARN() backtrace) that so far was only triggered by syzbot and the patch
>     changes user visible behavior.
> 
>  net/ipv6/addrconf.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>



  reply	other threads:[~2026-11-25 15:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 11:17 [PATCH net-next] ipv6: Do not keep loopback addresses when MTU is below minimum Ido Schimmel
2026-11-25 15:04 ` David Ahern [this message]
2026-11-26  9:07 ` Hangbin Liu
2026-11-30  3:50 ` patchwork-bot+netdevbpf

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=4a5e2005-a30f-4687-ba42-6e30b2c63fcf@kernel.org \
    --to=dsahern@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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.