diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-11-13 07:00:09 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-13 07:00:09 +0000 |
commit | f560fd07ef27eef3027f03e93e2c958375d60dd7 (patch) | |
tree | 38c9c19a5948edaa06ab43454fb38a96d9f9531d /pkg/tcpip/transport/raw | |
parent | f942d232b2c93d40a7af7007a8490c51d663e7f5 (diff) | |
parent | 5bb64ce1b8c42fcd96e44a5be05e17f34a83f840 (diff) |
Merge release-20201030.0-83-g5bb64ce1b (automated)
Diffstat (limited to 'pkg/tcpip/transport/raw')
-rw-r--r-- | pkg/tcpip/transport/raw/endpoint.go | 7 | ||||
-rw-r--r-- | pkg/tcpip/transport/raw/raw_state_autogen.go | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/raw/endpoint.go b/pkg/tcpip/transport/raw/endpoint.go index 7b6a87ba9..4ae1f92ab 100644 --- a/pkg/tcpip/transport/raw/endpoint.go +++ b/pkg/tcpip/transport/raw/endpoint.go @@ -89,6 +89,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 } // NewEndpoint returns a raw endpoint for the given protocols. @@ -756,3 +759,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/raw/raw_state_autogen.go b/pkg/tcpip/transport/raw/raw_state_autogen.go index 7a5831bf3..26fc86a27 100644 --- a/pkg/tcpip/transport/raw/raw_state_autogen.go +++ b/pkg/tcpip/transport/raw/raw_state_autogen.go @@ -61,6 +61,7 @@ func (e *endpoint) StateFields() []string { "bound", "linger", "owner", + "ops", } } @@ -82,6 +83,7 @@ func (e *endpoint) StateSave(stateSinkObject state.Sink) { stateSinkObject.Save(12, &e.bound) stateSinkObject.Save(13, &e.linger) stateSinkObject.Save(14, &e.owner) + stateSinkObject.Save(15, &e.ops) } func (e *endpoint) StateLoad(stateSourceObject state.Source) { @@ -99,6 +101,7 @@ func (e *endpoint) StateLoad(stateSourceObject state.Source) { 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.AfterLoad(e.afterLoad) } |