diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-11-18 21:45:50 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-18 21:45:50 +0000 |
commit | 077187bac84d6d2d6a2e728969a7211a4f520990 (patch) | |
tree | 25027b5712d18b48c33166f8e3046e87e69a8c38 /pkg/tcpip/transport/udp/endpoint.go | |
parent | cc20ad1486e549ae0924a1b4b3c18e7b3bf83eb9 (diff) | |
parent | 3e73c519a55191827dcc6e98ea0ffe977acbb73f (diff) |
Merge release-20201109.0-77-g3e73c519a (automated)
Diffstat (limited to 'pkg/tcpip/transport/udp/endpoint.go')
-rw-r--r-- | pkg/tcpip/transport/udp/endpoint.go | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/pkg/tcpip/transport/udp/endpoint.go b/pkg/tcpip/transport/udp/endpoint.go index 648587137..5aa16bf35 100644 --- a/pkg/tcpip/transport/udp/endpoint.go +++ b/pkg/tcpip/transport/udp/endpoint.go @@ -108,7 +108,6 @@ type endpoint struct { multicastLoop bool portFlags ports.Flags bindToDevice tcpip.NICID - noChecksum bool lastErrorMu sync.Mutex `state:"nosave"` lastError *tcpip.Error `state:".(string)"` @@ -550,7 +549,7 @@ func (e *endpoint) write(p tcpip.Payloader, opts tcpip.WriteOptions) (int64, <-c localPort := e.ID.LocalPort sendTOS := e.sendTOS owner := e.owner - noChecksum := e.noChecksum + noChecksum := e.SocketOptions().GetNoChecksum() lockReleased = true e.mu.RUnlock() @@ -583,11 +582,6 @@ func (e *endpoint) SetSockOptBool(opt tcpip.SockOptBool, v bool) *tcpip.Error { e.multicastLoop = v e.mu.Unlock() - case tcpip.NoChecksumOption: - e.mu.Lock() - e.noChecksum = v - e.mu.Unlock() - case tcpip.ReceiveTOSOption: e.mu.Lock() e.receiveTOS = v @@ -858,12 +852,6 @@ func (e *endpoint) GetSockOptBool(opt tcpip.SockOptBool) (bool, *tcpip.Error) { e.mu.RUnlock() return v, nil - case tcpip.NoChecksumOption: - e.mu.RLock() - v := e.noChecksum - e.mu.RUnlock() - return v, nil - case tcpip.ReceiveTOSOption: e.mu.RLock() v := e.receiveTOS |