summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/icmp
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-11-13 07:00:09 +0000
committergVisor bot <gvisor-bot@google.com>2020-11-13 07:00:09 +0000
commitf560fd07ef27eef3027f03e93e2c958375d60dd7 (patch)
tree38c9c19a5948edaa06ab43454fb38a96d9f9531d /pkg/tcpip/transport/icmp
parentf942d232b2c93d40a7af7007a8490c51d663e7f5 (diff)
parent5bb64ce1b8c42fcd96e44a5be05e17f34a83f840 (diff)
Merge release-20201030.0-83-g5bb64ce1b (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.go3
2 files changed, 10 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/icmp/endpoint.go b/pkg/tcpip/transport/icmp/endpoint.go
index 763cd8f84..440cb0352 100644
--- a/pkg/tcpip/transport/icmp/endpoint.go
+++ b/pkg/tcpip/transport/icmp/endpoint.go
@@ -79,6 +79,9 @@ type endpoint struct {
// owner is used to get uid and gid of the packet.
owner tcpip.PacketOwner
+
+ // ops is used to get socket level options.
+ ops tcpip.SocketOptions
}
func newEndpoint(s *stack.Stack, netProto tcpip.NetworkProtocolNumber, transProto tcpip.TransportProtocolNumber, waiterQueue *waiter.Queue) (tcpip.Endpoint, *tcpip.Error) {
@@ -853,3 +856,7 @@ func (*endpoint) Wait() {}
func (*endpoint) LastError() *tcpip.Error {
return nil
}
+
+func (e *endpoint) SocketOptions() *tcpip.SocketOptions {
+ return &e.ops
+}
diff --git a/pkg/tcpip/transport/icmp/icmp_state_autogen.go b/pkg/tcpip/transport/icmp/icmp_state_autogen.go
index 2acf00a72..81d864da0 100644
--- a/pkg/tcpip/transport/icmp/icmp_state_autogen.go
+++ b/pkg/tcpip/transport/icmp/icmp_state_autogen.go
@@ -60,6 +60,7 @@ func (e *endpoint) StateFields() []string {
"ttl",
"linger",
"owner",
+ "ops",
}
}
@@ -80,6 +81,7 @@ func (e *endpoint) StateSave(stateSinkObject state.Sink) {
stateSinkObject.Save(11, &e.ttl)
stateSinkObject.Save(12, &e.linger)
stateSinkObject.Save(13, &e.owner)
+ stateSinkObject.Save(14, &e.ops)
}
func (e *endpoint) StateLoad(stateSourceObject state.Source) {
@@ -96,6 +98,7 @@ func (e *endpoint) StateLoad(stateSourceObject state.Source) {
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.AfterLoad(e.afterLoad)
}