wgengine/router,ipn/ipnlocal: add MTU field to router config

The MacOS client can't set the MTU when creating the tun due to lack
of permissions, so add it to the router config and have MacOS set it
in the callback using a method that it does have permissions for.

Updates #8219

Signed-off-by: Val <valerie@tailscale.com>
This commit is contained in:
Val
2023-07-18 23:51:32 +02:00
committed by valscale
parent 9b5e29761c
commit 1138f4eb5f
3 changed files with 31 additions and 5 deletions

View File

@ -67,6 +67,11 @@ type Config struct {
// routing rules apply.
LocalRoutes []netip.Prefix
// NewMTU is currently only used by the MacOS network extension
// app to set the MTU of the tun in the router configuration
// callback. If zero, the MTU is unchanged.
NewMTU int
// Linux-only things below, ignored on other platforms.
SubnetRoutes []netip.Prefix // subnets being advertised to other Tailscale nodes
SNATSubnetRoutes bool // SNAT traffic to local subnets