1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 16:15:10 +00:00

Kernel: Silently discard SO_REUSEADDR

We were previously rejecting `SO_REUSEADDR` with an `ENOPROTOOPT`, but
that made QEMU unhappy. Instead, just silently discard it and print a
FIXME message in case anybody wonders what went wrong if the system
won't reuse an address.
This commit is contained in:
Tim Schumacher 2022-07-28 02:07:34 +02:00 committed by Brian Gianforcaro
parent f722612e17
commit 9fad80c34c

View file

@ -125,6 +125,9 @@ ErrorOr<void> Socket::setsockopt(int level, int option, Userspace<void const*> u
m_routing_disabled = TRY(copy_typed_from_user(static_ptr_cast<int const*>(user_value))) != 0;
return {};
}
case SO_REUSEADDR:
dbgln("FIXME: SO_REUSEADDR requested, but not implemented.");
return {};
default:
dbgln("setsockopt({}) at SOL_SOCKET not implemented.", option);
return ENOPROTOOPT;