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

Commit 9227b7f0 authored by nuccachen's avatar nuccachen
Browse files

gethtbyname: Reserve space for mapping IPv4 address to IPv6 address

Currently function return address space size is reserved by the address
family. When Netd does IPv6 prefix synthesis on an IPv4 resource record,
hostent structure has no enough address space for synthesized IPv6 address.
Reserving enough address space for either IPv4 or IPv6 avoids buffer
overflow while doing address family remapping in Netd.

Be aware of that we don't reserve address space for family remapping in
numeric hostname query which returns a fake address from numeric hostname.
The reason is this case doesn't trigger DNS64 synthesis in Netd.

Bug: 78545619
Test: netd_{unit,integration}_test pass
Change-Id: I506026cfa38c107e06440806a3080dd8d52a3bf2
parent c28257d8
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