summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-04-16 07:09:13 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-04-16 07:09:13 +0000
commitd6fad7d6e9ff2aa769faf823511533312955f002 (patch)
tree30c684f9f2ee08e96d98c13b041bf427c633de21
parentbfce4be5569c60687509a40c4f2304f2962182cb (diff)
parent260b91005f2e5728d7af591f0c03b5da9f0ff96e (diff)
downloadplatform_external_dnsmasq-android11-mainline-release.tar.gz
platform_external_dnsmasq-android11-mainline-release.tar.bz2
platform_external_dnsmasq-android11-mainline-release.zip
Snap for 6399349 from 260b91005f2e5728d7af591f0c03b5da9f0ff96e to mainline-releaseandroid-mainline-11.0.0_r1android11-mainline-release
Change-Id: I5e6da3e6701c1ea6bd61184101b3ac6d8e4ac1b5
-rw-r--r--src/network.c5
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);
}