diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-11-18 22:39:51 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-18 22:39:51 +0000 |
commit | 0e43c0c8fb48ec92a81599b016d35a28e9e0f168 (patch) | |
tree | f150ad2d41e4eb59e4cead6f51bfd6327243a5c6 /pkg/tcpip/transport/raw | |
parent | 3cae5fbf49773ca2ec7b2ea5163899a3965ff504 (diff) | |
parent | df37babd576ba4607e2fe69eb2c669aa2954b9cb (diff) |
Merge release-20201109.0-79-gdf37babd5 (automated)
Diffstat (limited to 'pkg/tcpip/transport/raw')
-rw-r--r-- | pkg/tcpip/transport/raw/endpoint.go | 3 | ||||
-rw-r--r-- | pkg/tcpip/transport/raw/raw_state_autogen.go | 63 |
2 files changed, 36 insertions, 30 deletions
diff --git a/pkg/tcpip/transport/raw/endpoint.go b/pkg/tcpip/transport/raw/endpoint.go index 0a1e1fbb3..e64392f7b 100644 --- a/pkg/tcpip/transport/raw/endpoint.go +++ b/pkg/tcpip/transport/raw/endpoint.go @@ -58,6 +58,8 @@ type rawPacket struct { // +stateify savable type endpoint struct { stack.TransportEndpointInfo + tcpip.DefaultSocketOptionsHandler + // The following fields are initialized at creation time and are // immutable. stack *stack.Stack `state:"manual"` @@ -116,6 +118,7 @@ func newEndpoint(s *stack.Stack, netProto tcpip.NetworkProtocolNumber, transProt associated: associated, hdrIncluded: !associated, } + e.ops.InitHandler(e) // Override with stack defaults. var ss stack.SendBufferSizeOption diff --git a/pkg/tcpip/transport/raw/raw_state_autogen.go b/pkg/tcpip/transport/raw/raw_state_autogen.go index 26fc86a27..4874e4636 100644 --- a/pkg/tcpip/transport/raw/raw_state_autogen.go +++ b/pkg/tcpip/transport/raw/raw_state_autogen.go @@ -47,6 +47,7 @@ func (e *endpoint) StateTypeName() string { func (e *endpoint) StateFields() []string { return []string{ "TransportEndpointInfo", + "DefaultSocketOptionsHandler", "waiterQueue", "associated", "hdrIncluded", @@ -68,41 +69,43 @@ func (e *endpoint) StateFields() []string { func (e *endpoint) StateSave(stateSinkObject state.Sink) { e.beforeSave() var rcvBufSizeMaxValue int = e.saveRcvBufSizeMax() - stateSinkObject.SaveValue(6, rcvBufSizeMaxValue) + stateSinkObject.SaveValue(7, rcvBufSizeMaxValue) stateSinkObject.Save(0, &e.TransportEndpointInfo) - stateSinkObject.Save(1, &e.waiterQueue) - stateSinkObject.Save(2, &e.associated) - stateSinkObject.Save(3, &e.hdrIncluded) - stateSinkObject.Save(4, &e.rcvList) - stateSinkObject.Save(5, &e.rcvBufSize) - stateSinkObject.Save(7, &e.rcvClosed) - stateSinkObject.Save(8, &e.sndBufSize) - stateSinkObject.Save(9, &e.sndBufSizeMax) - stateSinkObject.Save(10, &e.closed) - stateSinkObject.Save(11, &e.connected) - stateSinkObject.Save(12, &e.bound) - stateSinkObject.Save(13, &e.linger) - stateSinkObject.Save(14, &e.owner) - stateSinkObject.Save(15, &e.ops) + stateSinkObject.Save(1, &e.DefaultSocketOptionsHandler) + stateSinkObject.Save(2, &e.waiterQueue) + stateSinkObject.Save(3, &e.associated) + stateSinkObject.Save(4, &e.hdrIncluded) + stateSinkObject.Save(5, &e.rcvList) + stateSinkObject.Save(6, &e.rcvBufSize) + stateSinkObject.Save(8, &e.rcvClosed) + stateSinkObject.Save(9, &e.sndBufSize) + stateSinkObject.Save(10, &e.sndBufSizeMax) + stateSinkObject.Save(11, &e.closed) + stateSinkObject.Save(12, &e.connected) + stateSinkObject.Save(13, &e.bound) + stateSinkObject.Save(14, &e.linger) + stateSinkObject.Save(15, &e.owner) + stateSinkObject.Save(16, &e.ops) } func (e *endpoint) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.TransportEndpointInfo) - stateSourceObject.Load(1, &e.waiterQueue) - stateSourceObject.Load(2, &e.associated) - stateSourceObject.Load(3, &e.hdrIncluded) - stateSourceObject.Load(4, &e.rcvList) - stateSourceObject.Load(5, &e.rcvBufSize) - stateSourceObject.Load(7, &e.rcvClosed) - stateSourceObject.Load(8, &e.sndBufSize) - stateSourceObject.Load(9, &e.sndBufSizeMax) - stateSourceObject.Load(10, &e.closed) - stateSourceObject.Load(11, &e.connected) - stateSourceObject.Load(12, &e.bound) - stateSourceObject.Load(13, &e.linger) - stateSourceObject.Load(14, &e.owner) - stateSourceObject.Load(15, &e.ops) - stateSourceObject.LoadValue(6, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) }) + stateSourceObject.Load(1, &e.DefaultSocketOptionsHandler) + stateSourceObject.Load(2, &e.waiterQueue) + stateSourceObject.Load(3, &e.associated) + stateSourceObject.Load(4, &e.hdrIncluded) + stateSourceObject.Load(5, &e.rcvList) + stateSourceObject.Load(6, &e.rcvBufSize) + stateSourceObject.Load(8, &e.rcvClosed) + stateSourceObject.Load(9, &e.sndBufSize) + stateSourceObject.Load(10, &e.sndBufSizeMax) + stateSourceObject.Load(11, &e.closed) + stateSourceObject.Load(12, &e.connected) + stateSourceObject.Load(13, &e.bound) + stateSourceObject.Load(14, &e.linger) + stateSourceObject.Load(15, &e.owner) + stateSourceObject.Load(16, &e.ops) + stateSourceObject.LoadValue(7, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) }) stateSourceObject.AfterLoad(e.afterLoad) } |