ipv4: empty address should be a zero sa_len
UdpDomainSupport::ConnectEndpoint() uses SetToEmpty() to unconnect when used with AF_UNSPEC. checked against the output of the test sortix/os-test/udp/connect-unconnect-getpeername Change-Id: Iccfa46399a0e14057459966a2f406469566bcbac Reviewed-on: https://review.haiku-os.org/c/haiku/+/9396 Tested-by: Commit checker robot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -402,7 +402,7 @@ ipv4_set_to_empty_address(sockaddr *address)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
memset(address, 0, sizeof(sockaddr_in));
|
||||
address->sa_len = sizeof(sockaddr_in);
|
||||
address->sa_len = 0;
|
||||
address->sa_family = AF_INET;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user