summaryrefslogtreecommitdiff
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-06-12 10:08:24 -0700
committerJakub Kicinski <kuba@kernel.org>2025-08-29 11:48:01 -0700
commitd23ad54de795ec0054f90ecb03b41e8f2c410f3a (patch)
tree93ee9c1bfac4b54c567cc613039d4898cac04871 /net/ipv4/route.c
parent29828b81a46a3ae55ebc053fce512219172560ba (diff)
parent9c736ace0666efe68efd53fcdfa2c6653c3e0e72 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR (net-6.17-rc4). No conflicts. Adjacent changes: drivers/net/ethernet/intel/idpf/idpf_txrx.c 02614eee26fb ("idpf: do not linearize big TSO packets") 6c4e68480238 ("idpf: remove obsolete stashing code") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 771f6986ed05..cc86a917a1bb 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2576,12 +2576,16 @@ 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))
+ } else if (ipv4_is_zeronet(fl4->daddr)) {
return ERR_PTR(-EINVAL);
+ }
if (dev_out->flags & IFF_LOOPBACK)
flags |= RTCF_LOCAL;