diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-07-07 23:17:15 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-07 23:17:15 +0000 |
commit | 0f966793264293609fdf3b5bc9c39f4c7db8c8c3 (patch) | |
tree | 986ec22fef3a792f3cdf7b3bfb1b723bd9651393 /pkg/tcpip/transport/udp | |
parent | 8f32333b4fbbfe10a8fd1b3f7bfb5a14ba9781b2 (diff) | |
parent | 76c7bc51b7b02c4ba83c0a064c3629bb5ee91340 (diff) |
Merge release-20200622.1-76-g76c7bc51b (automated)
Diffstat (limited to 'pkg/tcpip/transport/udp')
-rw-r--r-- | pkg/tcpip/transport/udp/endpoint.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/udp/endpoint.go b/pkg/tcpip/transport/udp/endpoint.go index cae29fbff..0584ec8dc 100644 --- a/pkg/tcpip/transport/udp/endpoint.go +++ b/pkg/tcpip/transport/udp/endpoint.go @@ -612,6 +612,13 @@ func (e *endpoint) SetSockOptBool(opt tcpip.SockOptBool, v bool) *tcpip.Error { // SetSockOptInt implements tcpip.Endpoint.SetSockOptInt. func (e *endpoint) SetSockOptInt(opt tcpip.SockOptInt, v int) *tcpip.Error { switch opt { + case tcpip.MTUDiscoverOption: + // Return not supported if the value is not disabling path + // MTU discovery. + if v != tcpip.PMTUDiscoveryDont { + return tcpip.ErrNotSupported + } + case tcpip.MulticastTTLOption: e.mu.Lock() e.multicastTTL = uint8(v) @@ -906,6 +913,10 @@ func (e *endpoint) GetSockOptInt(opt tcpip.SockOptInt) (int, *tcpip.Error) { e.mu.RUnlock() return v, nil + case tcpip.MTUDiscoverOption: + // The only supported setting is path MTU discovery disabled. + return tcpip.PMTUDiscoveryDont, nil + case tcpip.MulticastTTLOption: e.mu.Lock() v := int(e.multicastTTL) |