diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2020-04-16 03:42:16 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-04-16 03:42:16 +0000 |
commit | 260b91005f2e5728d7af591f0c03b5da9f0ff96e (patch) | |
tree | 30c684f9f2ee08e96d98c13b041bf427c633de21 | |
parent | bfce4be5569c60687509a40c4f2304f2962182cb (diff) | |
parent | a5bc19e1f5e5c159b1a4019f84ed2958cdf26818 (diff) | |
download | platform_external_dnsmasq-260b91005f2e5728d7af591f0c03b5da9f0ff96e.tar.gz platform_external_dnsmasq-260b91005f2e5728d7af591f0c03b5da9f0ff96e.tar.bz2 platform_external_dnsmasq-260b91005f2e5728d7af591f0c03b5da9f0ff96e.zip |
Don't enumerate interfaces if no interfaces were found. am: 7b753522c0 am: 1c79886d80 am: a5bc19e1f5
Change-Id: Ib77d05a231675fae92e31f34598fee52c20b1ae0
-rw-r--r-- | src/network.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network.c b/src/network.c index 34d821d..98b4f68 100644 --- a/src/network.c +++ b/src/network.c @@ -833,8 +833,11 @@ void set_interfaces(const char* interfaces) { * Enumerate IP addresses (via RTM_GETADDR), adding IP entries to * daemon->interfaces for interface names listed in daemon->if_names. * The sockets are created by the create_bound_listener call below. + * Only do this if at least one interface was found. Otherwise, + * enumerate_interfaces will start listening on all interfaces on + * the system. */ - if (!enumerate_interfaces()) { + if (daemon->if_names != NULL && !enumerate_interfaces()) { die(_("enumerate interfaces error in set_interfaces: %s"), NULL, EC_BADNET); } |