linux-stable/net/ipv4
Oscar Maes effacdc9b2 net: ipv4: fix incorrect MTU in broadcast routes
[ Upstream commit 9e30ecf23b ]

Currently, __mkroute_output overrules the MTU value configured for
broadcast routes.

This buggy behaviour can be reproduced with:

ip link set dev eth1 mtu 9000
ip route del broadcast 192.168.0.255 dev eth1 proto kernel scope link src 192.168.0.2
ip route add broadcast 192.168.0.255 dev eth1 proto kernel scope link src 192.168.0.2 mtu 1500

The maximum packet size should be 1500, but it is actually 8000:

ping -b 192.168.0.255 -s 8000

Fix __mkroute_output to allow MTU values to be configured for
for broadcast routes (to support a mixed-MTU local-area-network).

Signed-off-by: Oscar Maes <oscmaes92@gmail.com>
Link: https://patch.msgid.link/20250710142714.12986-1-oscmaes92@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-20 18:36:04 +02:00
..
netfilter netfilter: nf_tables: nft_fib: consistent l3mdev handling 2025-06-19 15:40:00 +02:00
af_inet.c net: dismiss sk_forward_alloc_get() 2025-02-19 19:05:28 -08:00
ah4.c
arp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-02-20 10:37:30 -08:00
bpf_tcp_ca.c tcp: Pass flags to __tcp_send_ack 2025-03-17 13:56:38 +00:00
cipso_ipv4.c
datagram.c ipv4: Use inet_sk_init_flowi4() in ip4_datagram_release_cb(). 2024-12-20 13:50:09 -08:00
devinet.c net: switch to netif_disable_lro in inetdev_init 2025-04-03 15:32:08 -07:00
esp4_offload.c
esp4.c espintcp: remove encap socket caching to avoid reference leak 2025-04-14 11:59:17 +02:00
fib_frontend.c inet: fix lwtunnel_valid_encap_type() lock imbalance 2025-03-05 19:16:56 -08:00
fib_lookup.h
fib_notifier.c
fib_rules.c ipv4: fib_rules: Add DSCP mask matching 2025-02-21 16:08:47 -08:00
fib_semantics.c ipv4: fib: Namespacify fib_info hash tables. 2025-03-03 15:04:10 -08:00
fib_trie.c ipv4: fib: Move fib_valid_key_len() to rtm_to_fib_config(). 2025-03-03 15:04:11 -08:00
fou_bpf.c
fou_core.c
fou_nl.c
fou_nl.h
gre_demux.c
gre_offload.c
icmp.c inet: ping: avoid skb_clone() dance in ping_rcv() 2025-02-28 14:41:33 -08:00
igmp_internal.h netlink: support dumping IPv4 multicast addresses 2025-02-11 11:26:53 +01:00
igmp.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
inet_connection_sock.c tcp/dccp: Remove inet_connection_sock_af_ops.addr2sockaddr(). 2025-03-24 12:10:13 -07:00
inet_diag.c tcp/dccp: remove icsk->icsk_timeout 2025-03-25 10:34:33 -07:00
inet_fragment.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
inet_hashtables.c inet: call inet6_ehashfn() once from inet6_hash_connect() 2025-03-06 15:26:02 -08:00
inet_timewait_sock.c tcp: add RCU management to inet_bind_bucket 2025-03-04 17:46:26 -08:00
inetpeer.c inetpeer: use EXPORT_IPV6_MOD[_GPL]() 2025-02-14 13:09:39 -08:00
ip_forward.c
ip_fragment.c inet: frags: save a pair of atomic operations in reassembly 2025-03-18 13:18:36 +01:00
ip_gre.c net: ip_tunnel: Use link netns in newlink() of rtnl_link_ops 2025-02-21 15:28:02 -08:00
ip_input.c net: ipv4: fix stat increase when udp early demux drops the packet 2025-07-10 16:08:46 +02:00
ip_options.c
ip_output.c tcp: add new TCP_TW_ACK_OOW state and allow ECN bits in TOS 2025-03-17 13:56:17 +00:00
ip_sockglue.c Networking changes for 6.14. 2025-01-22 08:28:57 -08:00
ip_tunnel_core.c net: fix geneve_opt length integer overflow 2025-04-03 15:47:35 -07:00
ip_tunnel.c net: move misc netdev_lock flavors to a separate header 2025-03-08 09:06:50 -08:00
ip_vti.c net: ip_tunnel: Use link netns in newlink() of rtnl_link_ops 2025-02-21 15:28:02 -08:00
ipcomp.c
ipconfig.c
ipip.c net: ip_tunnel: Use link netns in newlink() of rtnl_link_ops 2025-02-21 15:28:02 -08:00
ipmr_base.c ipmr: do not call mr_mfc_uses_dev() for unres entries 2025-01-23 07:08:13 -08:00
ipmr.c mr: consolidate the ipmr_can_free_table() checks. 2025-05-16 17:53:48 -07:00
Kconfig
Makefile
metrics.c
netfilter.c
netlink.c
nexthop.c nexthop: Convert RTM_DELNEXTHOP to per-netns RTNL. 2025-03-25 07:32:00 -07:00
ping.c inet: ping: avoid skb_clone() dance in ping_rcv() 2025-02-28 14:41:33 -08:00
proc.c tcp: be less liberal in TSEcr received while in SYN_RECV state 2025-02-26 18:11:17 -08:00
protocol.c
raw_diag.c
raw.c ipv4: remove get_rttos 2025-02-18 18:27:19 -08:00
route.c net: ipv4: fix incorrect MTU in broadcast routes 2025-08-20 18:36:04 +02:00
syncookies.c tcp: be less liberal in TSEcr received while in SYN_RECV state 2025-02-26 18:11:17 -08:00
sysctl_net_ipv4.c tcp: add tcp_rto_max_ms sysctl 2025-02-11 13:08:00 +01:00
tcp_ao.c
tcp_bbr.c
tcp_bic.c
tcp_bpf.c bpf: Fix wrong copied_seq calculation 2025-01-29 13:32:23 -08:00
tcp_cdg.c
tcp_cong.c
tcp_cubic.c tcp_cubic: fix incorrect HyStart round start detection 2025-01-20 12:26:41 +00:00
tcp_dctcp.c tcp: helpers for ECN mode handling 2025-03-17 13:54:11 +00:00
tcp_dctcp.h tcp: Pass flags to __tcp_send_ack 2025-03-17 13:56:38 +00:00
tcp_diag.c tcp: ulp: diag: more info without CAP_NET_ADMIN 2025-03-07 19:39:53 -08:00
tcp_fastopen.c tcp: fix passive TFO socket having invalid NAPI ID 2025-06-27 11:13:39 +01:00
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c tcp: call tcp_measure_rcv_mss() for ooo packets 2025-08-15 12:16:30 +02:00
tcp_ipv4.c tcp/dccp: remove icsk->icsk_timeout 2025-03-25 10:34:33 -07:00
tcp_lp.c
tcp_metrics.c tcp: convert to dev_net_rcu() 2025-03-03 15:44:19 -08:00
tcp_minisocks.c tcp: add new TCP_TW_ACK_OOW state and allow ECN bits in TOS 2025-03-17 13:56:17 +00:00
tcp_nv.c
tcp_offload.c net: fix segmentation after TCP/UDP fraglist GRO 2025-07-24 08:58:38 +02:00
tcp_output.c tcp/dccp: remove icsk->icsk_ack.timeout 2025-03-25 10:34:33 -07:00
tcp_plb.c
tcp_rate.c
tcp_recovery.c
tcp_scalable.c
tcp_sigpool.c
tcp_timer.c Networking changes for 6.15. 2025-03-26 21:48:21 -07:00
tcp_ulp.c
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tcp.c tcp: Correct signedness in skb remaining space calculation 2025-07-17 18:43:41 +02:00
tunnel4.c
udp_bpf.c
udp_diag.c
udp_impl.h
udp_offload.c udp: also consider secpath when evaluating ipsec use for checksumming 2025-08-20 18:35:47 +02:00
udp_tunnel_core.c Revert "udp_tunnel: GRO optimizations" 2025-03-25 09:15:07 -07:00
udp_tunnel_nic.c
udp_tunnel_stub.c
udp.c udp: Fix memory accounting leak. 2025-04-02 17:18:27 -07:00
udplite.c
xfrm4_input.c xfrm: Set transport header to fix UDP GRO handling 2025-08-01 09:51:24 +01:00
xfrm4_output.c
xfrm4_policy.c
xfrm4_protocol.c
xfrm4_state.c
xfrm4_tunnel.c