diff --git a/Kernel/Net/Socket.cpp b/Kernel/Net/Socket.cpp index e8e7bedde5..d9ba096c4f 100644 --- a/Kernel/Net/Socket.cpp +++ b/Kernel/Net/Socket.cpp @@ -241,6 +241,14 @@ 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_BROADCAST: { int broadcast_allowed = m_broadcast_allowed ? 1 : 0; if (size < sizeof(broadcast_allowed))