Skip to content

Commit b4331a6

Browse files
sbrivio-rhklassert
authored andcommitted
vti6: Change minimum MTU to IPV4_MIN_MTU, vti6 can carry IPv4 too
A vti6 interface can carry IPv4 as well, so it makes no sense to enforce a minimum MTU of IPV6_MIN_MTU. If the user sets an MTU below IPV6_MIN_MTU, IPv6 will be disabled on the interface, courtesy of addrconf_notify(). Reported-by: Xin Long <lucien.xin@gmail.com> Fixes: b96f9af ("ipv4/6: use core net MTU range checking") Fixes: c6741fb ("vti6: Properly adjust vti6 MTU from MTU of lower device") Fixes: 53c81e9 ("ip6_vti: adjust vti mtu according to mtu of lower device") Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
1 parent b48c05a commit b4331a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv6/ip6_vti.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ static void vti6_link_config(struct ip6_tnl *t, bool keep_mtu)
669669
else
670670
mtu = ETH_DATA_LEN - LL_MAX_HEADER - sizeof(struct ipv6hdr);
671671

672-
dev->mtu = max_t(int, mtu, IPV6_MIN_MTU);
672+
dev->mtu = max_t(int, mtu, IPV4_MIN_MTU);
673673
}
674674

675675
/**
@@ -881,7 +881,7 @@ static void vti6_dev_setup(struct net_device *dev)
881881
dev->priv_destructor = vti6_dev_free;
882882

883883
dev->type = ARPHRD_TUNNEL6;
884-
dev->min_mtu = IPV6_MIN_MTU;
884+
dev->min_mtu = IPV4_MIN_MTU;
885885
dev->max_mtu = IP_MAX_MTU - sizeof(struct ipv6hdr);
886886
dev->flags |= IFF_NOARP;
887887
dev->addr_len = sizeof(struct in6_addr);

0 commit comments

Comments
 (0)