From: David Kalnischkies Date: Fri, 27 Nov 2009 23:53:53 +0000 (+0100) Subject: add AI_ADDRCONFIG to ai_flags in connect.cc as suggested by Aurelien Jarno X-Git-Tag: 0.8.0~39^2~46 X-Git-Url: https://git.hcoop.net/ntk/apt.git/commitdiff_plain/1df14bc5a7011c2da0ecd1e89911c64627119883 add AI_ADDRCONFIG to ai_flags in connect.cc as suggested by Aurelien Jarno in his response to Bernhard R. Link's patch, thanks! (Closes: #505020) --- diff --git a/debian/changelog b/debian/changelog index e865671f..fdd7bd24 100644 --- a/debian/changelog +++ b/debian/changelog @@ -42,6 +42,8 @@ apt (0.7.25) UNRELEASED; urgency=low - add --debian-only as alias for --diff-only * methods/connect.cc: - display also strerror of "wicked" getaddrinfo errors + - add AI_ADDRCONFIG to ai_flags as suggested by Aurelien Jarno + in response to Bernhard R. Link, thanks! (Closes: #505020) * buildlib/configure.mak, buildlib/config.{sub,guess}: - remove (outdated) config.{sub,guess} and use the ones provided by the new added build-dependency autotools-dev instead diff --git a/methods/connect.cc b/methods/connect.cc index 74e670eb..adb16a19 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -158,6 +158,7 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd, struct addrinfo Hints; memset(&Hints,0,sizeof(Hints)); Hints.ai_socktype = SOCK_STREAM; + Hints.ai_flags = AI_ADDRCONFIG; Hints.ai_protocol = 0; // if we couldn't resolve the host before, we don't try now