Re: [PATCH net-next v3 0/7] netconsole: validate a target's IP address configuration

From: Gustavo Luiz Duarte

Date: Wed Aug 19 2026 - 10:27:09 EST


On Tue, Aug 18, 2026 at 5:51 PM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Fri, 14 Aug 2026 20:28:51 +0100 Gustavo Luiz Duarte wrote:
> > This series adds two validations to the target configuration when the
> > user tries to enable it: first whether remote_ip was set, and second
> > whether local_ip and remote_ip address families match. Refuse to enable
> > the target if any of those validations fail.
> >
> > These validations are already done for the target passed on the
> > command-line, so this aligns dynamic targets with the command-line
> > behavior.
> >
> > The first two patches replace the per-target 'ipv6' flag with a
> > per-address 'family' field, which makes it easier to detect these error
> > conditions. Patches 3 and 4 implement the actual validations.
> >
> > Patches 5-7 are follow-ups from previous reviews: move inet_addr from
> > netpoll.h into netconsole.c, show an unset address as an empty string
> > rather than "0.0.0.0", document local_ip auto-selection.
>
> LGTM, but feels to risky to merge during the merge window.
> Since we're changing semantics we should let this sit in linux-next
> for at least a week. Please repost in Sept.

Sounds good.

>
> BTW please carefully review clashiko feedback:
> https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260814-netcons_ipv6-v3-7-bc0915e8c75f@xxxxxxxxx
> It marked as preexisting the problem of IP versions diverging but
> I think it's relevant (patch 2)?

The issue of IP versions diverging is indeed a preexisting bug and it
is fixed by patch 4/7.
I deliberately kept the fix separate from the refactoring for clarity.

Another preexisting bug that sashiko called out (patch 5) is the lack
of locking on local_ip_show / remote_ip_show, which can lead to
printing a partially updated address.
But worse than that is local_mac_show (sashiko missed this one), which
can lead to UAF if the user reads local_mac concurrently with target
teardown.
I will send a separate patch set to fix these *_show callbacks with
proper locking.