mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Remove unimplemented message for SO_LINGER
- Removes the unimplemented message for SO_LINGER - Fix the length for IP_PKTINFO option PiperOrigin-RevId: 352917611
This commit is contained in:
committed by
gVisor bot
parent
a50bc8446c
commit
b0136253e6
@@ -377,10 +377,8 @@ func (s *socketOpsCommon) SetSockOpt(t *kernel.Task, level int, name int, opt []
|
||||
switch level {
|
||||
case linux.SOL_IP:
|
||||
switch name {
|
||||
case linux.IP_TOS, linux.IP_RECVTOS, linux.IP_RECVORIGDSTADDR, linux.IP_RECVERR:
|
||||
case linux.IP_TOS, linux.IP_RECVTOS, linux.IP_PKTINFO, linux.IP_RECVORIGDSTADDR, linux.IP_RECVERR:
|
||||
optlen = sizeofInt32
|
||||
case linux.IP_PKTINFO:
|
||||
optlen = linux.SizeOfControlMessageIPPacketInfo
|
||||
}
|
||||
case linux.SOL_IPV6:
|
||||
switch name {
|
||||
|
||||
@@ -1814,10 +1814,6 @@ func setSockOptSocket(t *kernel.Task, s socket.SocketOps, ep commonEndpoint, nam
|
||||
var v linux.Linger
|
||||
binary.Unmarshal(optVal[:linux.SizeOfLinger], usermem.ByteOrder, &v)
|
||||
|
||||
if v != (linux.Linger{}) {
|
||||
socket.SetSockOptEmitUnimplementedEvent(t, name)
|
||||
}
|
||||
|
||||
ep.SocketOptions().SetLinger(tcpip.LingerOption{
|
||||
Enabled: v.OnOff != 0,
|
||||
Timeout: time.Second * time.Duration(v.Linger),
|
||||
|
||||
Reference in New Issue
Block a user