mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 23:30:20 +00:00
Kernel: Make accept() fill address with peer name rather than local name
This commit is contained in:
parent
5c0f1f9834
commit
5308e310a0
Notes:
sideshowbarker
2024-07-19 12:46:58 +09:00
Author: https://github.com/deoxxa
Commit: 5308e310a0
Pull-request: https://github.com/SerenityOS/serenity/pull/425
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