diff --git a/Kernel/Net/Socket.cpp b/Kernel/Net/Socket.cpp index 4de011b602255d..489e4b57a0d7c8 100644 --- a/Kernel/Net/Socket.cpp +++ b/Kernel/Net/Socket.cpp @@ -128,8 +128,10 @@ ErrorOr Socket::setsockopt(int level, int option, Userspace u return {}; } case SO_REUSEADDR: - dbgln("FIXME: SO_REUSEADDR requested, but not implemented."); - return {}; + // FIXME: Implement SO_REUSEADDR. Currently we just fail since the + // bind() behavior isn't implemented yet and pretending it works + // would be misleading to applications. + return ENOPROTOOPT; case SO_BROADCAST: { if (user_value_size != sizeof(int)) return EINVAL; @@ -241,14 +243,9 @@ ErrorOr Socket::getsockopt(OpenFileDescription&, int level, int option, Us size = sizeof(routing_disabled); return copy_to_user(value_size, &size); } - case SO_REUSEADDR: { - int reuse_address = 0; - if (size < sizeof(reuse_address)) - return EINVAL; - TRY(copy_to_user(static_ptr_cast(value), &reuse_address)); - size = sizeof(reuse_address); - return copy_to_user(value_size, &size); - } + case SO_REUSEADDR: + // FIXME: Implement SO_REUSEADDR + return ENOPROTOOPT; case SO_BROADCAST: { int broadcast_allowed = m_broadcast_allowed ? 1 : 0; if (size < sizeof(broadcast_allowed))