]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: ipv4: fix regression in local-broadcast routes
authorOscar Maes <oscmaes92@gmail.com>
Wed, 27 Aug 2025 06:23:21 +0000 (08:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Sep 2025 13:26:26 +0000 (15:26 +0200)
commitecbc060f347393917aecfd9e8b41627dbbf2cb49
tree2fbf8b429501a9b14fc3bda8f3e54c8523b3f65d
parenta160640526625b763c56050fcdbb73389c8ae20c
net: ipv4: fix regression in local-broadcast routes

[ Upstream commit 5189446ba995556eaa3755a6e875bc06675b88bd ]

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. This
preserves the intended changes for directed-broadcast packets.

Cc: stable@vger.kernel.org
Fixes: 9e30ecf23b1b ("net: ipv4: fix incorrect MTU in broadcast routes")
Reported-by: Brett A C Sheffield <bacs@librecast.net>
Closes: https://lore.kernel.org/regressions/20250822165231.4353-4-bacs@librecast.net
Signed-off-by: Oscar Maes <oscmaes92@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20250827062322.4807-1-oscmaes92@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/route.c