From: Jakub Kicinski <kuba@kernel.org>
To: Oscar Maes <oscmaes92@gmail.com>
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: Mon, 25 Aug 2025 15:56:30 -0700 [thread overview]
Message-ID: <20250825155630.5848c357@kernel.org> (raw)
In-Reply-To: <20250825060918.4799-1-oscmaes92@gmail.com>
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?
> 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
next prev parent reply other threads:[~2025-08-25 22:56 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
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 [this message]
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=20250825155630.5848c357@kernel.org \
--to=kuba@kernel.org \
--cc=bacs@librecast.net \
--cc=brett@librecast.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oscmaes92@gmail.com \
--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 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.