diff options
author | Peter Elliott <pelliott@ualberta.ca> | 2021-08-02 22:13:54 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-22 10:29:06 +0200 |
commit | 38e0d1b456a736208848bccbea97097877868d7e (patch) | |
tree | 27ea265386834375bd5e6d56173441604878f3b7 /Kernel/Net | |
parent | ee0c6e1b6d457c0e997ce0289aa785722d9f12d9 (diff) | |
download | serenity-38e0d1b456a736208848bccbea97097877868d7e.zip |
Kernel: Return ENOTSUP instead of panicking on invalid sockopt
X11 handles this gracefully, and it makes more sense than panicking.
Diffstat (limited to 'Kernel/Net')
-rw-r--r-- | Kernel/Net/LocalSocket.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Net/LocalSocket.cpp b/Kernel/Net/LocalSocket.cpp index 06bfe0d19f..78264cb517 100644 --- a/Kernel/Net/LocalSocket.cpp +++ b/Kernel/Net/LocalSocket.cpp @@ -399,9 +399,9 @@ KResult LocalSocket::getsockopt(FileDescription& description, int level, int opt switch (option) { case SO_SNDBUF: - TODO(); + return ENOTSUP; case SO_RCVBUF: - TODO(); + return ENOTSUP; case SO_PEERCRED: { if (size < sizeof(ucred)) return EINVAL; |