Merge aabee420826c3f5a10a39439eac4138680e38d53 on remote branch
Change-Id: Ic3b75e682d111269f06c89dd47f2ffa7f3e76a2a
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 @@
* 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);
}