Add support for custom socket options and setting the experiment IP option.

PiperOrigin-RevId: 700011458
This commit is contained in:
Lucas Manning
2024-11-25 09:43:21 -08:00
committed by gVisor bot
parent e816d99736
commit 2267c24a41
13 changed files with 193 additions and 57 deletions
+8
View File
@@ -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