Skip to content

Commit 9e30ecf

Browse files
oscar-maeskuba-moo
authored andcommitted
net: ipv4: fix incorrect MTU in broadcast routes
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 2f4053d commit 9e30ecf

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

net/ipv4/route.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2588,7 +2588,6 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
25882588
do_cache = true;
25892589
if (type == RTN_BROADCAST) {
25902590
flags |= RTCF_BROADCAST | RTCF_LOCAL;
2591-
fi = NULL;
25922591
} else if (type == RTN_MULTICAST) {
25932592
flags |= RTCF_MULTICAST | RTCF_LOCAL;
25942593
if (!ip_check_mc_rcu(in_dev, fl4->daddr, fl4->saddr,

0 commit comments

Comments
 (0)