diff options
author | Ryan Heacock <rheacock@google.com> | 2019-12-24 08:48:14 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-12-24 08:49:39 -0800 |
commit | e013c48c78c9a7daf245b7de9563e3a0bd8a1e97 (patch) | |
tree | 4569d1851e72e61faebc63c82997555afdde04a9 /pkg/tcpip/transport/raw | |
parent | 574e988f2bc6060078a17f37a377441703c52a22 (diff) |
Enable IP_RECVTOS socket option for datagram sockets
Added the ability to get/set the IP_RECVTOS socket option on UDP endpoints. If
enabled, TOS from the incoming Network Header passed as ancillary data in the
ControlMessages.
Test:
* Added unit test to udp_test.go that tests getting/setting as well as
verifying that we receive expected TOS from incoming packet.
* Added a syscall test
PiperOrigin-RevId: 287029703
Diffstat (limited to 'pkg/tcpip/transport/raw')
-rw-r--r-- | pkg/tcpip/transport/raw/endpoint.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/raw/endpoint.go b/pkg/tcpip/transport/raw/endpoint.go index 5aafe2615..6d23ab5a1 100644 --- a/pkg/tcpip/transport/raw/endpoint.go +++ b/pkg/tcpip/transport/raw/endpoint.go @@ -510,7 +510,7 @@ func (e *endpoint) SetSockOpt(opt interface{}) *tcpip.Error { } // SetSockOptInt implements tcpip.Endpoint.SetSockOptInt. -func (ep *endpoint) SetSockOptInt(opt tcpip.SockOpt, v int) *tcpip.Error { +func (e *endpoint) SetSockOptInt(opt tcpip.SockOpt, v int) *tcpip.Error { return tcpip.ErrUnknownProtocolOption } |