mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user