mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 12:27:35 +00:00
Kernel: Return the correct result for FIONREAD on datagram sockets
Before this commit, we only checked the receive buffer on the socket, which is unused on datagram streams. Now we return the actual size of the datagram without the protocol headers, which required the protocol to tell us what the size of the payload is.
This commit is contained in:
parent
e4a1bc1542
commit
3da0c072f4
6 changed files with 26 additions and 1 deletions
|
@ -174,6 +174,7 @@ private:
|
|||
virtual ErrorOr<size_t> protocol_send(const UserOrKernelBuffer&, size_t) override;
|
||||
virtual ErrorOr<void> protocol_connect(OpenFileDescription&, ShouldBlock) override;
|
||||
virtual ErrorOr<u16> protocol_allocate_local_port() override;
|
||||
virtual ErrorOr<size_t> protocol_size(ReadonlyBytes raw_ipv4_packet) override;
|
||||
virtual bool protocol_is_disconnected() const override;
|
||||
virtual ErrorOr<void> protocol_bind() override;
|
||||
virtual ErrorOr<void> protocol_listen(bool did_allocate_port) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue