mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
IPv4: Drop incoming packets on sockets that are shut down for reading
This commit is contained in:
parent
2b0b7cc5a4
commit
0c12d9a618
1 changed files with 4 additions and 0 deletions
|
@ -347,6 +347,10 @@ ssize_t IPv4Socket::recvfrom(FileDescription& description, void* buffer, size_t
|
|||
bool IPv4Socket::did_receive(const IPv4Address& source_address, u16 source_port, KBuffer&& packet)
|
||||
{
|
||||
LOCKER(lock());
|
||||
|
||||
if (is_shut_down_for_reading())
|
||||
return false;
|
||||
|
||||
auto packet_size = packet.size();
|
||||
|
||||
if (buffer_mode() == BufferMode::Bytes) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue