diff options
author | Bhasker Hariharan <bhaskerh@google.com> | 2020-07-11 06:21:34 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-11 06:22:47 -0700 |
commit | 216dcebc066c82907b0de790a77a3deb6a734805 (patch) | |
tree | d85e5ffe5d2359be720de1a3c84273d02a06a9fe /pkg/tcpip/transport/packet | |
parent | 5df3a8fedef7e54550d4c6b7172e25216600ee9f (diff) |
Stub out SO_DETACH_FILTER.
Updates #2746
PiperOrigin-RevId: 320757963
Diffstat (limited to 'pkg/tcpip/transport/packet')
-rw-r--r-- | pkg/tcpip/transport/packet/endpoint.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/packet/endpoint.go b/pkg/tcpip/transport/packet/endpoint.go index a8f8454dd..57b7f5c19 100644 --- a/pkg/tcpip/transport/packet/endpoint.go +++ b/pkg/tcpip/transport/packet/endpoint.go @@ -278,7 +278,13 @@ func (ep *endpoint) Readiness(mask waiter.EventMask) waiter.EventMask { // used with SetSockOpt, and this function always returns // tcpip.ErrNotSupported. func (ep *endpoint) SetSockOpt(opt interface{}) *tcpip.Error { - return tcpip.ErrUnknownProtocolOption + switch opt.(type) { + case tcpip.SocketDetachFilterOption: + return nil + + default: + return tcpip.ErrUnknownProtocolOption + } } // SetSockOptBool implements tcpip.Endpoint.SetSockOptBool. |