Eric Dumazet
e929ec98c0
macvlan: enforce a consistent minimal mtu
...
commit b64085b000 upstream.
macvlan should enforce a minimal mtu of 68, even at link creation.
This patch avoids the current behavior (which could lead to crashes
in ipv6 stack if the link is brought up)
$ ip link add macvlan1 link eno1 mtu 8 type macvlan # This should fail !
$ ip link sh dev macvlan1
5: macvlan1@eno1: <BROADCAST,MULTICAST> mtu 8 qdisc noop
state DOWN mode DEFAULT group default qlen 1000
link/ether 02:47:6c:24:74:82 brd ff:ff:ff:ff:ff:ff
$ ip link set macvlan1 mtu 67
Error: mtu less than device minimum.
$ ip link set macvlan1 mtu 68
$ ip link set macvlan1 mtu 8
Error: mtu less than device minimum.
Fixes: 91572088e3 ("net: use core MTU range checking in core net infra")
Reported-by: syzbot <syzkaller@googlegroups.com >
Signed-off-by: Eric Dumazet <edumazet@google.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-25 17:45:55 +01:00
..
2022-11-25 17:45:50 +01:00
2022-11-10 18:14:22 +01:00
2022-04-08 14:40:02 +02:00
2022-11-10 18:14:25 +01:00
2022-11-25 17:45:45 +01:00
2022-08-25 11:38:02 +02:00
2021-11-18 14:04:24 +01:00
2022-11-03 23:57:53 +09:00
2021-09-15 09:50:45 +02:00
2022-11-25 17:45:47 +01:00
2022-10-26 13:25:21 +02:00
2022-08-21 15:15:35 +02:00
2021-05-26 12:06:55 +02:00
2022-10-26 13:25:41 +02:00
2022-10-26 13:25:54 +02:00
2022-07-07 17:52:23 +02:00
2022-11-03 23:57:50 +09:00
2022-10-30 09:41:15 +01:00
2021-11-18 14:04:05 +01:00
2022-10-26 13:25:43 +02:00
2022-09-28 11:10:41 +02:00
2022-07-07 17:52:18 +02:00
2022-11-16 09:57:20 +01:00
2022-10-26 13:25:48 +02:00
2022-08-03 12:00:50 +02:00
2022-06-14 18:32:43 +02:00
2022-05-12 12:25:32 +02:00
2022-11-25 17:45:53 +01:00
2022-10-26 13:25:33 +02:00
2022-10-26 13:25:38 +02:00
2022-09-28 11:10:27 +02:00
2022-11-25 17:45:44 +01:00
2022-04-08 14:39:50 +02:00
2022-11-16 09:57:08 +01:00
2022-10-26 13:25:32 +02:00
2022-09-28 11:10:39 +02:00
2022-10-30 09:41:15 +01:00
2022-11-16 09:57:07 +01:00
2022-11-10 18:14:25 +01:00
2022-11-25 17:45:40 +01:00
2022-07-25 11:26:43 +02:00
2022-11-25 17:45:52 +01:00
2022-11-10 18:14:17 +01:00
2022-11-25 17:45:55 +01:00
2022-09-28 11:10:28 +02:00
2022-11-25 17:45:53 +01:00
2021-10-06 15:56:01 +02:00
2022-08-25 11:38:12 +02:00
2022-11-25 17:45:46 +01:00
2022-10-26 13:25:18 +02:00
2022-05-09 09:04:56 +02:00
2022-08-11 13:06:47 +02:00
2022-10-26 13:25:40 +02:00
2021-09-30 10:11:00 +02:00
2022-11-25 17:45:52 +01:00
2022-11-10 18:14:22 +01:00
2022-10-26 13:25:28 +02:00
2022-08-21 15:15:58 +02:00
2022-11-25 17:45:41 +01:00
2022-11-25 17:45:54 +01:00
2022-11-25 17:45:53 +01:00
2021-11-18 14:03:51 +01:00
2022-11-25 17:45:41 +01:00
2022-11-25 17:45:55 +01:00
2022-11-10 18:14:17 +01:00
2022-08-25 11:38:01 +02:00
2022-07-07 17:52:15 +02:00
2022-11-25 17:45:54 +01:00
2022-01-27 10:54:22 +01:00
2022-09-23 14:16:57 +02:00
2022-08-21 15:16:04 +02:00
2022-11-10 18:14:27 +01:00
2022-11-25 17:45:44 +01:00
2022-10-26 13:25:11 +02:00
2022-06-14 18:32:30 +02:00
2022-09-20 12:38:32 +02:00
2022-11-16 09:57:08 +01:00
2022-11-25 17:45:44 +01:00
2022-11-25 17:45:47 +01:00
2022-10-26 13:25:52 +02:00
2022-10-26 13:25:44 +02:00
2022-04-13 21:00:55 +02:00
2022-08-21 15:15:37 +02:00
2021-05-26 12:06:52 +02:00
2022-10-26 13:25:46 +02:00
2022-08-21 15:16:08 +02:00
2022-10-05 10:38:40 +02:00
2022-10-15 07:55:54 +02:00
2022-06-14 18:32:33 +02:00
2022-11-25 17:45:53 +01:00
2022-11-25 17:45:55 +01:00
2021-11-26 10:39:12 +01:00
2022-11-25 17:45:44 +01:00
2022-11-25 17:45:50 +01:00
2022-10-26 13:25:29 +02:00
2022-10-26 13:25:53 +02:00
2022-11-25 17:45:42 +01:00
2022-10-26 13:25:39 +02:00
2021-07-14 16:56:21 +02:00
2022-11-10 18:14:22 +01:00
2022-11-25 17:45:55 +01:00
2022-09-15 11:32:04 +02:00
2022-10-26 13:25:56 +02:00
2022-10-26 13:25:16 +02:00
2022-11-25 17:45:52 +01:00
2021-05-26 12:06:52 +02:00
2022-11-25 17:45:51 +01:00
2022-06-09 10:21:29 +02:00
2022-09-28 11:10:38 +02:00
2022-10-26 13:25:22 +02:00
2022-11-10 18:14:21 +01:00
2022-08-25 11:38:14 +02:00
2022-07-21 21:20:13 +02:00
2021-07-14 16:56:41 +02:00
2022-04-13 21:01:01 +02:00
2022-08-21 15:16:10 +02:00
2022-11-25 17:45:47 +01:00