mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 13:19:47 +00:00
Kernel: Make accept() fill address with peer name rather than local name
This commit is contained in:
committed by
Andreas Kling
parent
5c0f1f9834
commit
5308e310a0
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user