mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Add support for custom socket options and setting the experiment IP option.
PiperOrigin-RevId: 700011458
This commit is contained in:
committed by
gVisor bot
parent
e816d99736
commit
2267c24a41
@@ -1107,6 +1107,10 @@ func getSockOptSocket(t *kernel.Task, s socket.Socket, ep commonEndpoint, family
|
||||
|
||||
v := primitive.Int32(ep.SocketOptions().GetRcvlowat())
|
||||
return &v, nil
|
||||
default:
|
||||
if v, err, handled := getSockOptSocketCustom(t, s, ep, name, outLen); handled {
|
||||
return v, err
|
||||
}
|
||||
}
|
||||
return nil, syserr.ErrProtocolNotAvailable
|
||||
}
|
||||
@@ -2028,6 +2032,10 @@ func setSockOptSocket(t *kernel.Task, s socket.Socket, ep commonEndpoint, name i
|
||||
v := hostarch.ByteOrder.Uint32(optVal)
|
||||
ep.SocketOptions().SetRcvlowat(int32(v))
|
||||
return nil
|
||||
default:
|
||||
if err, handled := setSockOptSocketCustom(t, s, ep, name, optVal); handled {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user