Improve gVisor UDP

This commit is contained in:
世界 2023-07-23 14:01:36 +08:00
parent fd850d00e5
commit bbf542f01a
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
4 changed files with 28 additions and 10 deletions

View file

@ -51,7 +51,7 @@ func (e *DarwinEndpoint) Attach(dispatcher stack.NetworkDispatcher) {
}
func (e *DarwinEndpoint) dispatchLoop() {
packetBuffer := make([]byte, e.tun.mtu + 4)
packetBuffer := make([]byte, e.tun.mtu+4)
for {
n, err := e.tun.tunFile.Read(packetBuffer)
if err != nil {