mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Permit setting unknown options
This previously changed in 305699233, but this behaviour turned out to be load bearing. PiperOrigin-RevId: 307033802
This commit is contained in:
committed by
gVisor bot
parent
f03996c5e9
commit
b4de018a67
@@ -850,7 +850,6 @@ func (e *baseEndpoint) SetSockOptBool(opt tcpip.SockOptBool, v bool) *tcpip.Erro
|
||||
case tcpip.ReuseAddressOption:
|
||||
default:
|
||||
log.Warningf("Unsupported socket option: %d", opt)
|
||||
return tcpip.ErrUnknownProtocolOption
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -861,7 +860,6 @@ func (e *baseEndpoint) SetSockOptInt(opt tcpip.SockOptInt, v int) *tcpip.Error {
|
||||
case tcpip.ReceiveBufferSizeOption:
|
||||
default:
|
||||
log.Warningf("Unsupported socket option: %d", opt)
|
||||
return tcpip.ErrUnknownProtocolOption
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ func (e *endpoint) SetSockOpt(opt interface{}) *tcpip.Error {
|
||||
|
||||
// SetSockOptBool sets a socket option. Currently not supported.
|
||||
func (e *endpoint) SetSockOptBool(opt tcpip.SockOptBool, v bool) *tcpip.Error {
|
||||
return tcpip.ErrUnknownProtocolOption
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetSockOptInt sets a socket option. Currently not supported.
|
||||
@@ -364,8 +364,6 @@ func (e *endpoint) SetSockOptInt(opt tcpip.SockOptInt, v int) *tcpip.Error {
|
||||
e.ttl = uint8(v)
|
||||
e.mu.Unlock()
|
||||
|
||||
default:
|
||||
return tcpip.ErrUnknownProtocolOption
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1477,8 +1477,6 @@ func (e *endpoint) SetSockOptBool(opt tcpip.SockOptBool, v bool) *tcpip.Error {
|
||||
e.LockUser()
|
||||
e.v6only = v
|
||||
e.UnlockUser()
|
||||
default:
|
||||
return tcpip.ErrUnknownProtocolOption
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -1592,8 +1590,6 @@ func (e *endpoint) SetSockOptInt(opt tcpip.SockOptInt, v int) *tcpip.Error {
|
||||
e.ttl = uint8(v)
|
||||
e.UnlockUser()
|
||||
|
||||
default:
|
||||
return tcpip.ErrUnknownProtocolOption
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -553,8 +553,6 @@ func (e *endpoint) SetSockOptBool(opt tcpip.SockOptBool, v bool) *tcpip.Error {
|
||||
}
|
||||
|
||||
e.v6only = v
|
||||
default:
|
||||
return tcpip.ErrUnknownProtocolOption
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -586,8 +584,6 @@ func (e *endpoint) SetSockOptInt(opt tcpip.SockOptInt, v int) *tcpip.Error {
|
||||
case tcpip.ReceiveBufferSizeOption:
|
||||
case tcpip.SendBufferSizeOption:
|
||||
|
||||
default:
|
||||
return tcpip.ErrUnknownProtocolOption
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user