netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oscar Maes <oscmaes92@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: bacs@librecast.net, brett@librecast.net, davem@davemloft.net,
	dsahern@kernel.org, netdev@vger.kernel.org,
	regressions@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH net 1/2] net: ipv4: fix regression in local-broadcast routes
Date: Tue, 26 Aug 2025 14:11:26 +0200	[thread overview]
Message-ID: <20250826121126-oscmaes92@gmail.com> (raw)
In-Reply-To: <20250825155630.5848c357@kernel.org>

On Mon, Aug 25, 2025 at 03:56:30PM -0700, Jakub Kicinski wrote:
> On Mon, 25 Aug 2025 08:09:17 +0200 Oscar Maes wrote:
> > Commit 9e30ecf23b1b ("net: ipv4: fix incorrect MTU in broadcast routes")
> > introduced a regression where local-broadcast packets would have their
> > gateway set in __mkroute_output, which was caused by fi = NULL being
> > removed.
> > 
> > Fix this by resetting the fib_info for local-broadcast packets.
> 
> Meaning that 9e30ecf23b1b would still change behavior for the subnet
> broadcast address?
> 

Yes. This is OK because subnet broadcast addresses have separate entries
in the local fib table.

> > diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> > index f639a2ae881a..98d237e3ec04 100644
> > --- a/net/ipv4/route.c
> > +++ b/net/ipv4/route.c
> > @@ -2575,9 +2575,12 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
> >  		    !netif_is_l3_master(dev_out))
> >  			return ERR_PTR(-EINVAL);
> >  
> > -	if (ipv4_is_lbcast(fl4->daddr))
> > +	if (ipv4_is_lbcast(fl4->daddr)) {
> >  		type = RTN_BROADCAST;
> > -	else if (ipv4_is_multicast(fl4->daddr))
> > +
> > +		/* reset fi to prevent gateway resolution */
> > +		fi = NULL;
> > +	} else if (ipv4_is_multicast(fl4->daddr))
> >  		type = RTN_MULTICAST;
> >  	else if (ipv4_is_zeronet(fl4->daddr))
> >  		return ERR_PTR(-EINVAL);
> 
> nit: please add curly braces around all branches of this if / else if /
> else ladder, per kernel coding style guide.
> -- 
> pw-bot: cr

  reply	other threads:[~2025-08-26 12:11 UTC|newest]

Thread overview: 18+ 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-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
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  7:03           ` Brett A C Sheffield
2025-08-25 22:56         ` [PATCH net 1/2] net: ipv4: fix regression in local-broadcast routes Jakub Kicinski
2025-08-26 12:11           ` Oscar Maes [this message]
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-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=20250826121126-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).