From: Ido Schimmel <idosch@nvidia.com>
To: Shuai Liu <847807867@qq.com>
Cc: netdev@vger.kernel.org, dsahern@kernel.org, edumazet@kernel.org,
davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org,
syzbot+af16ddc8fd22a1d135f8@syzkaller.appspotmail.com
Subject: Re: [PATCH net v2] ipv6: addrconf: regenerate missing host route on RTM_NEWADDR
Date: Wed, 18 Nov 2026 11:49:48 +0200 [thread overview]
Message-ID: <20261118094948.GA1097953@shredder> (raw)
In-Reply-To: <tencent_98F714E924966679E826125C2CB18B092A07@qq.com>
On Wed, Nov 18, 2026 at 02:30:00PM +0800, Shuai Liu wrote:
> When an interface MTU drops below IPV6_MIN_MTU, addrconf_notify()
> stops IPv6 on the interface via addrconf_ifdown(). With
> keep_addr_on_down enabled, permanent addresses are kept but their
> host routes are deleted and ifp->rt is cleared; recovery is expected
> to happen when the device is brought up, where the NETDEV_UP path
> runs addrconf_permanent_addr().
This is only true for the loopback device. Other devices lose their
addresses regardless of keep_addr_on_down.
>
> That recovery never happens when IPv6 is stopped through the
> NETDEV_CHANGEMTU path: the device itself never goes down, so no
> NETDEV_UP event follows when the MTU is restored. The address is
> left with ifp->rt == NULL while the device is up, and every later
> RTM_NEWADDR notification only warns:
>
> BUG: Address ::ffff:127.0.0.1 on device lo is missing its host route.
>
> syzbot hit this by flapping lo's MTU across IPV6_MIN_MTU with
> keep_addr_on_down set and toggling IFF_NOARP, which restarts DAD;
> DAD is skipped on the loopback device, so DAD completion and the
> warning repeat on every toggle and the address stays permanently
> without its host route.
>
> Instead of only warning, regenerate the host route with
> fixup_permanent_addr() when RTM_NEWADDR arrives for an address
> without ifp->rt on an up device, keeping the warning only for the
> allocation failure case.
The better solution is to avoid getting into this state in the first
place by aligning the loopback device with other devices and flushing
its addresses when the MTU goes below the minimum.
Already discussed here:
https://lore.kernel.org/netdev/20260909115655.GA1344764@shredder/
I will post my patch next week.
And please read:
https://docs.kernel.org/next/process/maintainer-netdev.html
"don’t repost your patches within one 24h period".
next prev parent reply other threads:[~2026-11-18 9:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20261118062828.840641-1-847807867@qq.com>
2026-11-18 6:30 ` [PATCH net v2] ipv6: addrconf: regenerate missing host route on RTM_NEWADDR Shuai Liu
2026-11-18 9:49 ` Ido Schimmel [this message]
2026-11-18 9:59 ` Shuai Liu
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=20261118094948.GA1097953@shredder \
--to=idosch@nvidia.com \
--cc=847807867@qq.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+af16ddc8fd22a1d135f8@syzkaller.appspotmail.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.