mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:48:12 +00:00
Kernel: Make accept() fill address with peer name rather than local name
This commit is contained in:
parent
5c0f1f9834
commit
5308e310a0
1 changed files with 1 additions and 1 deletions
|
@ -2167,7 +2167,7 @@ int Process::sys$accept(int accepting_socket_fd, sockaddr* address, socklen_t* a
|
|||
}
|
||||
auto accepted_socket = socket.accept();
|
||||
ASSERT(accepted_socket);
|
||||
bool success = accepted_socket->get_local_address(address, address_size);
|
||||
bool success = accepted_socket->get_peer_address(address, address_size);
|
||||
ASSERT(success);
|
||||
auto accepted_socket_description = FileDescription::create(move(accepted_socket), SocketRole::Accepted);
|
||||
// NOTE: The accepted socket inherits fd flags from the accepting socket.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue