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 | |
parent | cc20ad1486e549ae0924a1b4b3c18e7b3bf83eb9 (diff) | |
parent | 3e73c519a55191827dcc6e98ea0ffe977acbb73f (diff) |
Merge release-20201109.0-77-g3e73c519a (automated)
Diffstat (limited to 'pkg/tcpip/transport')
-rw-r--r-- | pkg/tcpip/transport/udp/endpoint.go | 14 | ||||
-rw-r--r-- | pkg/tcpip/transport/udp/udp_state_autogen.go | 55 |
2 files changed, 27 insertions, 42 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 diff --git a/pkg/tcpip/transport/udp/udp_state_autogen.go b/pkg/tcpip/transport/udp/udp_state_autogen.go index 6a715cc10..9350a4809 100644 --- a/pkg/tcpip/transport/udp/udp_state_autogen.go +++ b/pkg/tcpip/transport/udp/udp_state_autogen.go @@ -72,7 +72,6 @@ func (e *endpoint) StateFields() []string { "multicastLoop", "portFlags", "bindToDevice", - "noChecksum", "lastError", "boundBindToDevice", "boundPortFlags", @@ -94,7 +93,7 @@ func (e *endpoint) StateSave(stateSinkObject state.Sink) { var rcvBufSizeMaxValue int = e.saveRcvBufSizeMax() stateSinkObject.SaveValue(5, rcvBufSizeMaxValue) var lastErrorValue string = e.saveLastError() - stateSinkObject.SaveValue(21, lastErrorValue) + stateSinkObject.SaveValue(20, lastErrorValue) stateSinkObject.Save(0, &e.TransportEndpointInfo) stateSinkObject.Save(1, &e.waiterQueue) stateSinkObject.Save(2, &e.uniqueID) @@ -114,19 +113,18 @@ func (e *endpoint) StateSave(stateSinkObject state.Sink) { stateSinkObject.Save(17, &e.multicastLoop) stateSinkObject.Save(18, &e.portFlags) stateSinkObject.Save(19, &e.bindToDevice) - stateSinkObject.Save(20, &e.noChecksum) - stateSinkObject.Save(22, &e.boundBindToDevice) - stateSinkObject.Save(23, &e.boundPortFlags) - stateSinkObject.Save(24, &e.sendTOS) - stateSinkObject.Save(25, &e.receiveTOS) - stateSinkObject.Save(26, &e.receiveTClass) - stateSinkObject.Save(27, &e.receiveIPPacketInfo) - stateSinkObject.Save(28, &e.shutdownFlags) - stateSinkObject.Save(29, &e.multicastMemberships) - stateSinkObject.Save(30, &e.effectiveNetProtos) - stateSinkObject.Save(31, &e.owner) - stateSinkObject.Save(32, &e.linger) - stateSinkObject.Save(33, &e.ops) + stateSinkObject.Save(21, &e.boundBindToDevice) + stateSinkObject.Save(22, &e.boundPortFlags) + stateSinkObject.Save(23, &e.sendTOS) + stateSinkObject.Save(24, &e.receiveTOS) + stateSinkObject.Save(25, &e.receiveTClass) + stateSinkObject.Save(26, &e.receiveIPPacketInfo) + stateSinkObject.Save(27, &e.shutdownFlags) + stateSinkObject.Save(28, &e.multicastMemberships) + stateSinkObject.Save(29, &e.effectiveNetProtos) + stateSinkObject.Save(30, &e.owner) + stateSinkObject.Save(31, &e.linger) + stateSinkObject.Save(32, &e.ops) } func (e *endpoint) StateLoad(stateSourceObject state.Source) { @@ -149,21 +147,20 @@ func (e *endpoint) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(17, &e.multicastLoop) stateSourceObject.Load(18, &e.portFlags) stateSourceObject.Load(19, &e.bindToDevice) - stateSourceObject.Load(20, &e.noChecksum) - stateSourceObject.Load(22, &e.boundBindToDevice) - stateSourceObject.Load(23, &e.boundPortFlags) - stateSourceObject.Load(24, &e.sendTOS) - stateSourceObject.Load(25, &e.receiveTOS) - stateSourceObject.Load(26, &e.receiveTClass) - stateSourceObject.Load(27, &e.receiveIPPacketInfo) - stateSourceObject.Load(28, &e.shutdownFlags) - stateSourceObject.Load(29, &e.multicastMemberships) - stateSourceObject.Load(30, &e.effectiveNetProtos) - stateSourceObject.Load(31, &e.owner) - stateSourceObject.Load(32, &e.linger) - stateSourceObject.Load(33, &e.ops) + stateSourceObject.Load(21, &e.boundBindToDevice) + stateSourceObject.Load(22, &e.boundPortFlags) + stateSourceObject.Load(23, &e.sendTOS) + stateSourceObject.Load(24, &e.receiveTOS) + stateSourceObject.Load(25, &e.receiveTClass) + stateSourceObject.Load(26, &e.receiveIPPacketInfo) + stateSourceObject.Load(27, &e.shutdownFlags) + stateSourceObject.Load(28, &e.multicastMemberships) + stateSourceObject.Load(29, &e.effectiveNetProtos) + stateSourceObject.Load(30, &e.owner) + stateSourceObject.Load(31, &e.linger) + stateSourceObject.Load(32, &e.ops) stateSourceObject.LoadValue(5, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) }) - stateSourceObject.LoadValue(21, new(string), func(y interface{}) { e.loadLastError(y.(string)) }) + stateSourceObject.LoadValue(20, new(string), func(y interface{}) { e.loadLastError(y.(string)) }) stateSourceObject.AfterLoad(e.afterLoad) } |