mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Log endpoint type when SOL_IP options are not supported.
PiperOrigin-RevId: 647392128
This commit is contained in:
@@ -1572,7 +1572,7 @@ func getSockOptIPv6(t *kernel.Task, s socket.Socket, ep commonEndpoint, name int
|
||||
// getSockOptIP implements GetSockOpt when level is SOL_IP.
|
||||
func getSockOptIP(t *kernel.Task, s socket.Socket, ep commonEndpoint, name int, outPtr hostarch.Addr, outLen int, _ int) (marshal.Marshallable, *syserr.Error) {
|
||||
if _, ok := ep.(tcpip.Endpoint); !ok {
|
||||
log.Warningf("SOL_IP options not supported on endpoints other than tcpip.Endpoint: option = %d", name)
|
||||
log.Warningf("SOL_IP options not supported on endpoints other than tcpip.Endpoint: option = %d, endpoint = %T", name, ep)
|
||||
return nil, syserr.ErrUnknownProtocolOption
|
||||
}
|
||||
|
||||
@@ -2430,7 +2430,7 @@ func parseIntOrChar(buf []byte) (int32, *syserr.Error) {
|
||||
// setSockOptIP implements SetSockOpt when level is SOL_IP.
|
||||
func setSockOptIP(t *kernel.Task, s socket.Socket, ep commonEndpoint, name int, optVal []byte) *syserr.Error {
|
||||
if _, ok := ep.(tcpip.Endpoint); !ok {
|
||||
log.Warningf("SOL_IP options not supported on endpoints other than tcpip.Endpoint: option = %d", name)
|
||||
log.Warningf("SOL_IP options not supported on endpoints other than tcpip.Endpoint: option = %d, endpoint = %T", name, ep)
|
||||
return syserr.ErrUnknownProtocolOption
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user