summaryrefslogtreecommitdiff
path: root/server/NetworkController.cpp
diff options
context:
space:
mode:
authorJooyung Han <jooyung@google.com>2019-11-27 15:36:29 +0900
committerJooyung Han <jooyung@google.com>2019-11-27 16:22:46 +0900
commit3e64aa182fef7af15f62a937b0e2aebcc218d977 (patch)
tree09cc16a11daa523133cbc3ad42a3172a87e6dca9 /server/NetworkController.cpp
parent071fc8b80a5fa8d25d8ee40a7d688b8beefa330b (diff)
Use stubs generated by build system
instead of hand-crafted stub for libnetd_resolv apex. Bug: N/A Test: m && flash && boot Test: adb shell ldd /system/bin/netd # shows libnetd_resolv.so from apex Change-Id: I0eefe1fb2bfef70489c32fd075a11cef538e048b
Diffstat (limited to 'server/NetworkController.cpp')
-rw-r--r--server/NetworkController.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/server/NetworkController.cpp b/server/NetworkController.cpp
index e490a9f0..3e428ff3 100644
--- a/server/NetworkController.cpp
+++ b/server/NetworkController.cpp
@@ -30,7 +30,6 @@
#include <android-base/strings.h>
#include <cutils/misc.h> // FIRST_APPLICATION_UID
#include <netd_resolv/resolv.h>
-#include <netd_resolv/resolv_stub.h>
#include "log/log.h"
#include "Controllers.h"
@@ -213,8 +212,7 @@ uint32_t NetworkController::getNetworkForDnsLocked(unsigned* netId, uid_t uid) c
// servers (through the default network). Otherwise, the query is guaranteed to fail.
// http://b/29498052
Network *network = getNetworkLocked(*netId);
- if (network && network->getType() == Network::VIRTUAL &&
- !RESOLV_STUB.resolv_has_nameservers(*netId)) {
+ if (network && network->getType() == Network::VIRTUAL && !resolv_has_nameservers(*netId)) {
*netId = mDefaultNetId;
}
} else {
@@ -223,7 +221,7 @@ uint32_t NetworkController::getNetworkForDnsLocked(unsigned* netId, uid_t uid) c
// them). Otherwise, use the default network's DNS servers.
// TODO: Consider if we should set the explicit bit here.
VirtualNetwork* virtualNetwork = getVirtualNetworkForUserLocked(uid);
- if (virtualNetwork && RESOLV_STUB.resolv_has_nameservers(virtualNetwork->getNetId())) {
+ if (virtualNetwork && resolv_has_nameservers(virtualNetwork->getNetId())) {
*netId = virtualNetwork->getNetId();
} else {
// TODO: return an error instead of silently doing the DNS lookup on the wrong network.