vti6: Fix dev->max_mtu setting
We shouldn't allow a tunnel to have IP_MAX_MTU as MTU, because
another IPv6 header is going on top of our packets. Without this
patch, we might end up building packets bigger than IP_MAX_MTU.
Fixes: b96f9afee4
("ipv4/6: use core net MTU range checking")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Acked-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
This commit is contained in:
Родитель
7a67e69a33
Коммит
f8a554b4aa
|
@ -879,7 +879,7 @@ static void vti6_dev_setup(struct net_device *dev)
|
|||
|
||||
dev->type = ARPHRD_TUNNEL6;
|
||||
dev->min_mtu = IPV6_MIN_MTU;
|
||||
dev->max_mtu = IP_MAX_MTU;
|
||||
dev->max_mtu = IP_MAX_MTU - sizeof(struct ipv6hdr);
|
||||
dev->flags |= IFF_NOARP;
|
||||
dev->addr_len = sizeof(struct in6_addr);
|
||||
netif_keep_dst(dev);
|
||||
|
|
Загрузка…
Ссылка в новой задаче