Skip to content
Commit 7a67e69a authored by Stefano Brivio's avatar Stefano Brivio Committed by Steffen Klassert
Browse files

vti6: Keep set MTU on link creation or change, validate it



In vti6_link_config(), if MTU is already given on link creation
or change, validate and use it instead of recomputing it. To do
that, we need to propagate the knowledge that MTU was set by
userspace all the way down to vti6_link_config().

To keep this simple, vti6_dev_init() sets the new 'keep_mtu'
argument of vti6_link_config() to true: on initialization, we
don't have convenient access to netlink attributes there, but we
will anyway check whether dev->mtu is set in vti6_link_config().
If it's non-zero, it was set to the value of the IFLA_MTU
attribute during creation. Otherwise, determine a reasonable
value.

Fixes: ed1efb2a ("ipv6: Add support for IPsec virtual tunnel interfaces")
Fixes: 53c81e95 ("ip6_vti: adjust vti mtu according to mtu of lower device")
Signed-off-by: default avatarStefano Brivio <sbrivio@redhat.com>
Acked-by: default avatarSabrina Dubroca <sd@queasysnail.net>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent c6741fbe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment