From 46de1d7f03b7debfd14ccf77a6e63fa2e66f9f04 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Wed, 12 Apr 2017 13:57:06 -0700 Subject: adb: don't try to resolve 'localhost' Misconfigured systems can have localhost pointing to an address that isn't 127.0.0.1 or ::1. adb is the only caller of the libcutils socket_loopback functions, so move them into adb and switch the implementations over to using INADDR_LOOPBACK and in6addr_loopback, instead of resolving 'localhost' when connecting. Bug: http://b/37282612 Test: `killall adb; adb shell` Test: `killall adb; ip addr del 127.0.0.1/8 dev lo; adb shell` Change-Id: I01c1885f1d9757ad0f7b353dd04b4d1f057741c8 --- libcutils/Android.bp | 1 - 1 file changed, 1 deletion(-) (limited to 'libcutils/Android.bp') diff --git a/libcutils/Android.bp b/libcutils/Android.bp index f668f18e5..bb82f4da3 100644 --- a/libcutils/Android.bp +++ b/libcutils/Android.bp @@ -24,7 +24,6 @@ libcutils_nonwindows_sources = [ "socket_inaddr_any_server_unix.c", "socket_local_client_unix.c", "socket_local_server_unix.c", - "socket_loopback_server_unix.c", "socket_network_client_unix.c", "sockets_unix.cpp", "str_parms.c", -- cgit v1.2.3-54-g00ecf