Query libnetd_client for the appropriate netId for host resolution.
If libnetd_client can't be found, operate as before and use the default netId
potentially overriden by a more specific netId passed in to
android_get*fornet().
(cherry picked from commit 559c7842cc)
Change-Id: I42ef3293172651870fb46d2de22464c4f03e8e0b
This commit is contained in:
committed by
Sreeram Ramachandran
parent
308c30af72
commit
5240b562e7
@@ -25,9 +25,14 @@
|
||||
extern "C" __socketcall int __accept(int, sockaddr*, socklen_t*);
|
||||
extern "C" __socketcall int __connect(int, const sockaddr*, socklen_t);
|
||||
|
||||
static unsigned fallBackNetIdForResolv(unsigned netId) {
|
||||
return netId;
|
||||
}
|
||||
|
||||
// This structure is modified only at startup (when libc.so is loaded) and never
|
||||
// afterwards, so it's okay that it's read later at runtime without a lock.
|
||||
__LIBC_HIDDEN__ NetdClientDispatch __netdClientDispatch __attribute__((aligned(32))) = {
|
||||
__accept,
|
||||
__connect,
|
||||
fallBackNetIdForResolv,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user