mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:22:07 +00:00
IPv4: Save the source address/port together with incoming packet payloads.
We need the address/port to fill in the out-params in recvfrom(). It should now be more or less possible to create a UDP server. :^)
This commit is contained in:
parent
c4bb9a3ccb
commit
780d2a08c4
6 changed files with 29 additions and 21 deletions
|
@ -2105,9 +2105,9 @@ ssize_t Process::sys$recvfrom(const Syscall::SC_recvfrom_params* params)
|
|||
if (!validate_write(buffer, buffer_length))
|
||||
return -EFAULT;
|
||||
if (addr_length) {
|
||||
if (!validate_read_typed(addr_length))
|
||||
if (!validate_write_typed(addr_length))
|
||||
return -EFAULT;
|
||||
if (!validate_read(addr, *addr_length))
|
||||
if (!validate_write(addr, *addr_length))
|
||||
return -EFAULT;
|
||||
} else if (addr) {
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue