Improve darwin bridge
This commit is contained in:
@@ -23,6 +23,12 @@ var (
|
||||
bridgeInet6LocalBase = netip.MustParseAddr("2001:db8:1::1")
|
||||
)
|
||||
|
||||
// The darwin forwarding path silently drops frames larger than the outgoing
|
||||
// interface MTU (no ICMP, no counter), and virtualized ingress interfaces
|
||||
// (vmnet LRO) deliver TCP frames coalesced far beyond their own 1500 MTU, so
|
||||
// the bridge tun must accept full-size IP packets.
|
||||
const bridgeTunMTU = 0xffff
|
||||
|
||||
type backendDarwin struct {
|
||||
backendBase
|
||||
|
||||
@@ -89,6 +95,7 @@ func (b *backendDarwin) start() error {
|
||||
Logger: b.logger,
|
||||
EXP_ExternalConfiguration: true,
|
||||
EXP_MultiPendingPackets: true,
|
||||
EXP_SendMsgX: true,
|
||||
})
|
||||
if err != nil {
|
||||
return E.Cause(err, "create bridge tun")
|
||||
|
||||
@@ -20,6 +20,8 @@ import (
|
||||
const (
|
||||
defaultBridgeRuleIndex = 100
|
||||
defaultBridgeTableIndexBase = 2200
|
||||
|
||||
bridgeTunMTU = 1500
|
||||
)
|
||||
|
||||
type backendLinux struct {
|
||||
|
||||
@@ -13,7 +13,6 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
bridgeTunMTU = 1500
|
||||
maxPacketLength = 0xffff
|
||||
bridgeMaxInstances = 254
|
||||
bridgeWriteBatchSize = 32
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
//go:build windows && (amd64 || 386)
|
||||
|
||||
package bridge
|
||||
|
||||
const bridgeTunMTU = 1500
|
||||
Reference in New Issue
Block a user