summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/icmp
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-11-18 22:39:51 +0000
committergVisor bot <gvisor-bot@google.com>2020-11-18 22:39:51 +0000
commit0e43c0c8fb48ec92a81599b016d35a28e9e0f168 (patch)
treef150ad2d41e4eb59e4cead6f51bfd6327243a5c6 /pkg/tcpip/transport/icmp
parent3cae5fbf49773ca2ec7b2ea5163899a3965ff504 (diff)
parentdf37babd576ba4607e2fe69eb2c669aa2954b9cb (diff)
Merge release-20201109.0-79-gdf37babd5 (automated)
Diffstat (limited to 'pkg/tcpip/transport/icmp')
-rw-r--r--pkg/tcpip/transport/icmp/endpoint.go7
-rw-r--r--pkg/tcpip/transport/icmp/icmp_state_autogen.go59
2 files changed, 36 insertions, 30 deletions
diff --git a/pkg/tcpip/transport/icmp/endpoint.go b/pkg/tcpip/transport/icmp/endpoint.go
index fe6514bcd..39560a9fa 100644
--- a/pkg/tcpip/transport/icmp/endpoint.go
+++ b/pkg/tcpip/transport/icmp/endpoint.go
@@ -49,6 +49,7 @@ const (
// +stateify savable
type endpoint struct {
stack.TransportEndpointInfo
+ tcpip.DefaultSocketOptionsHandler
// The following fields are initialized at creation time and are
// immutable.
@@ -85,7 +86,7 @@ type endpoint struct {
}
func newEndpoint(s *stack.Stack, netProto tcpip.NetworkProtocolNumber, transProto tcpip.TransportProtocolNumber, waiterQueue *waiter.Queue) (tcpip.Endpoint, *tcpip.Error) {
- return &endpoint{
+ ep := &endpoint{
stack: s,
TransportEndpointInfo: stack.TransportEndpointInfo{
NetProto: netProto,
@@ -96,7 +97,9 @@ func newEndpoint(s *stack.Stack, netProto tcpip.NetworkProtocolNumber, transProt
sndBufSize: 32 * 1024,
state: stateInitial,
uniqueID: s.UniqueID(),
- }, nil
+ }
+ ep.ops.InitHandler(ep)
+ return ep, nil
}
// UniqueID implements stack.TransportEndpoint.UniqueID.
diff --git a/pkg/tcpip/transport/icmp/icmp_state_autogen.go b/pkg/tcpip/transport/icmp/icmp_state_autogen.go
index 81d864da0..0fcfe0dd8 100644
--- a/pkg/tcpip/transport/icmp/icmp_state_autogen.go
+++ b/pkg/tcpip/transport/icmp/icmp_state_autogen.go
@@ -47,6 +47,7 @@ func (e *endpoint) StateTypeName() string {
func (e *endpoint) StateFields() []string {
return []string{
"TransportEndpointInfo",
+ "DefaultSocketOptionsHandler",
"waiterQueue",
"uniqueID",
"rcvReady",
@@ -67,39 +68,41 @@ func (e *endpoint) StateFields() []string {
func (e *endpoint) StateSave(stateSinkObject state.Sink) {
e.beforeSave()
var rcvBufSizeMaxValue int = e.saveRcvBufSizeMax()
- stateSinkObject.SaveValue(5, rcvBufSizeMaxValue)
+ stateSinkObject.SaveValue(6, rcvBufSizeMaxValue)
stateSinkObject.Save(0, &e.TransportEndpointInfo)
- stateSinkObject.Save(1, &e.waiterQueue)
- stateSinkObject.Save(2, &e.uniqueID)
- stateSinkObject.Save(3, &e.rcvReady)
- stateSinkObject.Save(4, &e.rcvList)
- stateSinkObject.Save(6, &e.rcvBufSize)
- stateSinkObject.Save(7, &e.rcvClosed)
- stateSinkObject.Save(8, &e.sndBufSize)
- stateSinkObject.Save(9, &e.shutdownFlags)
- stateSinkObject.Save(10, &e.state)
- stateSinkObject.Save(11, &e.ttl)
- stateSinkObject.Save(12, &e.linger)
- stateSinkObject.Save(13, &e.owner)
- stateSinkObject.Save(14, &e.ops)
+ stateSinkObject.Save(1, &e.DefaultSocketOptionsHandler)
+ stateSinkObject.Save(2, &e.waiterQueue)
+ stateSinkObject.Save(3, &e.uniqueID)
+ stateSinkObject.Save(4, &e.rcvReady)
+ stateSinkObject.Save(5, &e.rcvList)
+ stateSinkObject.Save(7, &e.rcvBufSize)
+ stateSinkObject.Save(8, &e.rcvClosed)
+ stateSinkObject.Save(9, &e.sndBufSize)
+ stateSinkObject.Save(10, &e.shutdownFlags)
+ stateSinkObject.Save(11, &e.state)
+ stateSinkObject.Save(12, &e.ttl)
+ stateSinkObject.Save(13, &e.linger)
+ stateSinkObject.Save(14, &e.owner)
+ stateSinkObject.Save(15, &e.ops)
}
func (e *endpoint) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &e.TransportEndpointInfo)
- stateSourceObject.Load(1, &e.waiterQueue)
- stateSourceObject.Load(2, &e.uniqueID)
- stateSourceObject.Load(3, &e.rcvReady)
- stateSourceObject.Load(4, &e.rcvList)
- stateSourceObject.Load(6, &e.rcvBufSize)
- stateSourceObject.Load(7, &e.rcvClosed)
- stateSourceObject.Load(8, &e.sndBufSize)
- stateSourceObject.Load(9, &e.shutdownFlags)
- stateSourceObject.Load(10, &e.state)
- stateSourceObject.Load(11, &e.ttl)
- stateSourceObject.Load(12, &e.linger)
- stateSourceObject.Load(13, &e.owner)
- stateSourceObject.Load(14, &e.ops)
- stateSourceObject.LoadValue(5, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) })
+ stateSourceObject.Load(1, &e.DefaultSocketOptionsHandler)
+ stateSourceObject.Load(2, &e.waiterQueue)
+ stateSourceObject.Load(3, &e.uniqueID)
+ stateSourceObject.Load(4, &e.rcvReady)
+ stateSourceObject.Load(5, &e.rcvList)
+ stateSourceObject.Load(7, &e.rcvBufSize)
+ stateSourceObject.Load(8, &e.rcvClosed)
+ stateSourceObject.Load(9, &e.sndBufSize)
+ stateSourceObject.Load(10, &e.shutdownFlags)
+ stateSourceObject.Load(11, &e.state)
+ stateSourceObject.Load(12, &e.ttl)
+ 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.AfterLoad(e.afterLoad)
}