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:
@@ -21,8 +21,8 @@ func mustCIDRs(ss ...string) []netip.Prefix {
|
||||
|
||||
func TestConfigEqual(t *testing.T) {
|
||||
testedFields := []string{
|
||||
"LocalAddrs", "Routes", "LocalRoutes", "SubnetRoutes",
|
||||
"SNATSubnetRoutes", "NetfilterMode",
|
||||
"LocalAddrs", "Routes", "LocalRoutes", "NewMTU",
|
||||
"SubnetRoutes", "SNATSubnetRoutes", "NetfilterMode",
|
||||
}
|
||||
configType := reflect.TypeOf(Config{})
|
||||
configFields := []string{}
|
||||
@@ -134,6 +134,16 @@ func TestConfigEqual(t *testing.T) {
|
||||
&Config{NetfilterMode: preftype.NetfilterNoDivert},
|
||||
true,
|
||||
},
|
||||
{
|
||||
&Config{NewMTU: 0},
|
||||
&Config{NewMTU: 0},
|
||||
true,
|
||||
},
|
||||
{
|
||||
&Config{NewMTU: 1280},
|
||||
&Config{NewMTU: 0},
|
||||
false,
|
||||
},
|
||||
}
|
||||
for i, tt := range tests {
|
||||
got := tt.a.Equal(tt.b)
|
||||
|
||||
Reference in New Issue
Block a user