Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a49c0ba9 authored by nuccachen's avatar nuccachen
Browse files

get_ai: Allocate socket address space for struct sockaddr_union

Currently socket address space is allocated by the address family. When Netd
does IPv6 prefix synthesis on an IPv4 resource record, Netd can't directly cast
a sockaddr_in pointer to a sockaddr_in6 pointer for reporting synthesized IPv6
address. The size of sockaddr_union is enough for either an IPv6 or IPv4
address. It allows that a socket address can be directly cast as
a protocol-specific (IPv4/IPv6) address structure.

Bug: 78545619
Test: netd_{unit,integration}_test pass
Change-Id: I49fcba89a7de59a5ca49933f84887177c5500425
parent a4b33028
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment