summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-04-17 02:11:41 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-04-17 02:11:41 +0000
commitdd59cb20a101fc265f901d59e8d82366ac2c6e0d (patch)
tree30c684f9f2ee08e96d98c13b041bf427c633de21
parentbfce4be5569c60687509a40c4f2304f2962182cb (diff)
parent1c79886d80c41032e9ab09be9df23ed6e7b86b0e (diff)
downloaddnsmasq-android11-d1-release.tar.gz
Change-Id: I2b36d3803ced5e441a40472202b088e538d75b89
-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);
}