wgengine/netstack: make netstack MTU be 1280 also

Updates #3878

Change-Id: I1850085b32c8a40d85607b4ad433622c97d96a8d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-05-31 15:35:01 -07:00
committed by Brad Fitzpatrick
parent 81487169f0
commit 1336fb740b
3 changed files with 19 additions and 11 deletions

View File

@ -131,7 +131,7 @@ type Impl struct {
var handleSSH func(logger.Logf, *ipnlocal.LocalBackend, net.Conn) error
const nicID = 1
const mtu = 1500
const mtu = tstun.DefaultMTU
// Create creates and populates a new Impl.
func Create(logf logger.Logf, tundev *tstun.Wrapper, e wgengine.Engine, mc *magicsock.Conn, dialer *tsdial.Dialer, dns *dns.Manager) (*Impl, error) {
@ -1018,7 +1018,7 @@ func startPacketCopy(ctx context.Context, cancel context.CancelFunc, dst net.Pac
}
go func() {
defer cancel() // tear down the other direction's copy
pkt := make([]byte, mtu)
pkt := make([]byte, 1500)
for {
select {
case <-ctx.Done():