diff --git a/ChangeLog.txt b/ChangeLog.txt index 3dc15e6b..5225bf7f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -6,6 +6,8 @@ Broker: Closes #900. - Print more OpenSSL errors when loading certificates/keys fail. - Use AF_UNSPEC etc. instead of PF_UNSPEC to comply with POSIX. Closes #863. +- Remove use of AI_ADDRCONFIG, which means the broker can be used on systems + where only the loopback interface is defined. Closes #869, Closes #901. 1.5 - 20180502 diff --git a/lib/net_mosq.c b/lib/net_mosq.c index 11d7fad6..4473eb7c 100644 --- a/lib/net_mosq.c +++ b/lib/net_mosq.c @@ -46,9 +46,6 @@ Contributors: #endif #ifdef __QNX__ -#ifndef AI_ADDRCONFIG -#define AI_ADDRCONFIG 0 -#endif #include #include #endif @@ -311,7 +308,6 @@ int net__try_connect(struct mosquitto *mosq, const char *host, uint16_t port, mo *sock = INVALID_SOCKET; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; - hints.ai_flags = AI_ADDRCONFIG; hints.ai_socktype = SOCK_STREAM; s = getaddrinfo(host, NULL, &hints, &ainfo); diff --git a/src/conf.c b/src/conf.c index 9af80224..06513348 100644 --- a/src/conf.c +++ b/src/conf.c @@ -115,7 +115,6 @@ static int conf__attempt_resolve(const char *host, const char *text, int log, co memset(&gai_hints, 0, sizeof(struct addrinfo)); gai_hints.ai_family = AF_UNSPEC; - gai_hints.ai_flags = AI_ADDRCONFIG; gai_hints.ai_socktype = SOCK_STREAM; gai_res = NULL; rc = getaddrinfo(host, NULL, &gai_hints, &gai_res);