diff options
author | Andreas Kling <kling@serenityos.org> | 2021-04-30 12:29:30 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-30 15:27:41 +0200 |
commit | a5f385f05265fa3a54b9f27d25b7ff6f48ce97f8 (patch) | |
tree | 7066c03ddc62818b9510862fc1799e4697b87914 /Kernel/Net | |
parent | 71a10eb8e79d2fad2359c39ce314b9b92a5221bf (diff) | |
download | serenity-a5f385f05265fa3a54b9f27d25b7ff6f48ce97f8.zip |
Kernel: Fix bogus error codes from raw socket protocol_{send,receive}
Since these return KResultOr, we should not negate the error code.
Diffstat (limited to 'Kernel/Net')
-rw-r--r-- | Kernel/Net/IPv4Socket.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Net/IPv4Socket.h b/Kernel/Net/IPv4Socket.h index 4333e04df8..ed7f021bc1 100644 --- a/Kernel/Net/IPv4Socket.h +++ b/Kernel/Net/IPv4Socket.h @@ -74,8 +74,8 @@ protected: virtual KResult protocol_bind() { return KSuccess; } virtual KResult protocol_listen() { return KSuccess; } - virtual KResultOr<size_t> protocol_receive(ReadonlyBytes /* raw_ipv4_packet */, UserOrKernelBuffer&, size_t, int) { return -ENOTIMPL; } - virtual KResultOr<size_t> protocol_send(const UserOrKernelBuffer&, size_t) { return -ENOTIMPL; } + virtual KResultOr<size_t> protocol_receive(ReadonlyBytes /* raw_ipv4_packet */, UserOrKernelBuffer&, size_t, int) { return ENOTIMPL; } + virtual KResultOr<size_t> protocol_send(const UserOrKernelBuffer&, size_t) { return ENOTIMPL; } virtual KResult protocol_connect(FileDescription&, ShouldBlock) { return KSuccess; } virtual KResultOr<u16> protocol_allocate_local_port() { return ENOPROTOOPT; } virtual bool protocol_is_disconnected() const { return false; } |