stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oscar Maes <oscmaes92@gmail.com>
To: Brett Sheffield <brett@librecast.net>,
	Brett A C Sheffield <bacs@librecast.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: regressions@lists.linux.dev, netdev@vger.kernel.org,
	stable@vger.kernel.org, davem@davemloft.net, dsahern@kernel.org
Subject: Re: [REGRESSION][BISECTED][PATCH] net: ipv4: fix regression in broadcast routes
Date: Mon, 25 Aug 2025 08:02:29 +0200	[thread overview]
Message-ID: <20250825060229-oscmaes92@gmail.com> (raw)
In-Reply-To: <aKmzB57MKbpXh-_Z@karahi.gladserv.com>

On Sat, Aug 23, 2025 at 02:24:39PM +0200, Brett Sheffield wrote:
> On 2025-08-22 18:32, Jakub Kicinski wrote:
> > Thanks for bisecting and fixing!
> > 
> > > The broadcast_pmtu.sh selftest provided with the original patch still
> > > passes with this patch applied.
> > 
> > Hm, yes, AFACT we're losing PMTU discovery but perhaps original commit
> > wasn't concerned with that. Hopefully Oscar can comment.
> 
> Indeed. This takes it back to the previous behaviour.
> 
> > On Fri, 22 Aug 2025 16:50:51 +0000 Brett A C Sheffield wrote:
> > > +		if (type == RTN_BROADCAST) {
> > > +			/* ensure MTU value for broadcast routes is retained */
> > > +			ip_dst_init_metrics(&rth->dst, res->fi->fib_metrics);
> > 
> > You need to check if res->fi is actually set before using it
> 
> Ah, yes.  Fixed.
> 
> > Could you add a selftest / test case for the scenario we broke?
> > selftests can be in C / bash / Python. If bash hopefully socat
> > can be used to repro, cause it looks like wakeonlan is not very
> > widely packaged.
> 
> Self-test added using socat as requested. If you want this wrapped in namespaces
> etc. let me know. I started doing that, but decided a simpler test without
> requiring root was better and cleaner.
> 
> Thanks for the review Jakub.  v2 patches sent.
> 
> Cheers,
> 
> 
> Brett
> -- 
> Brett Sheffield (he/him)
> Librecast - Decentralising the Internet with Multicast
> https://librecast.net/
> https://blog.brettsheffield.com/

Replying to you both.

I missed this regression when I tested the blamed commit. Glad this surfaced quickly.

Just to clarify, the issue isn't that the destination address is "mangled".
The removal of fi = NULL inadvertently causes a gateway to be assigned to
local broadcast packets (see the call to rt_set_nexthop), which results in the
observed regression. __mkroute_output is still correct for directed broadcast packets
due to them having their own routes in the local table. The regression can easily be
fixed by setting the fib info to NULL for lbcast packets.

The submitted selftest only fails if a default gateway is configured, but does not
set one up. I'll submit my own patches to fix the regression and improve the
selftest shortly.

Oscar

  reply	other threads:[~2025-08-25  6:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22 16:50 [REGRESSION][BISECTED][PATCH] net: ipv4: fix regression in broadcast routes Brett A C Sheffield
2025-08-22 17:11 ` kernel test robot
2025-08-23  1:32 ` Jakub Kicinski
2025-08-23 12:13   ` [PATCH v2 1/2] selftests: net: add test for broadcast destination Brett A C Sheffield
2025-08-23 12:13   ` [PATCH v2 2/2] net: ipv4: fix regression in broadcast routes Brett A C Sheffield
2025-08-23 12:24   ` [REGRESSION][BISECTED][PATCH] " Brett Sheffield
2025-08-25  6:02     ` Oscar Maes [this message]
2025-08-25  6:09       ` [PATCH net 1/2] net: ipv4: fix regression in local-broadcast routes Oscar Maes
2025-08-25  6:09         ` [PATCH net 2/2] selftests: net: add test for destination in broadcast packets Oscar Maes
2025-08-25  6:11           ` kernel test robot
2025-08-25  7:03           ` Brett A C Sheffield
2025-08-25  6:11         ` [PATCH net 1/2] net: ipv4: fix regression in local-broadcast routes kernel test robot
2025-08-25 22:56         ` Jakub Kicinski
2025-08-26 12:11           ` Oscar Maes
2025-08-26 12:17             ` [PATCH net v2 " Oscar Maes
2025-08-26 12:17             ` [PATCH net v2 2/2] selftests: net: add test for destination in broadcast packets Oscar Maes
2025-08-26 12:19               ` kernel test robot
2025-08-27  1:29               ` Jakub Kicinski
2025-08-28  8:17 ` [REGRESSION][BISECTED][PATCH] net: ipv4: fix regression in broadcast routes kernel test robot
2025-08-28 10:35   ` Paolo Abeni
2025-08-28 10:46     ` Brett A C Sheffield
2025-08-29  2:08       ` Oliver Sang

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=20250825060229-oscmaes92@gmail.com \
    --to=oscmaes92@gmail.com \
    --cc=bacs@librecast.net \
    --cc=brett@librecast.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=stable@vger.kernel.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).