From 70c436d2735011599c6847cd6d96503cd6efc926 Mon Sep 17 00:00:00 2001 From: grzegol Date: Thu, 20 Nov 2003 15:13:25 +0000 Subject: [PATCH] - use AI_ADDRCONFIG if available to avoid returning IPv6 addresses to hosts without an IPv6 interface Changed files: evolution-addrconfig.patch -> 1.1 --- evolution-addrconfig.patch | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 evolution-addrconfig.patch diff --git a/evolution-addrconfig.patch b/evolution-addrconfig.patch new file mode 100644 index 0000000..ad9f307 --- /dev/null +++ b/evolution-addrconfig.patch @@ -0,0 +1,38 @@ +2003-10-16 Jeremy Katz + + * e-host-utils.c (e_gethostbyname_r): use AI_ADDRCONFIG if + available to avoid returning IPv6 addresses to hosts without an + IPv6 interface. + +Index: e-util//e-host-utils.c +=================================================================== +RCS file: /cvs/gnome/evolution/e-util/e-host-utils.c,v +retrieving revision 1.14.4.2 +diff -u -u -r1.14.4.2 e-host-utils.c +--- e-util//e-host-utils.c 8 Oct 2003 20:36:22 -0000 1.14.4.2 ++++ e-util//e-host-utils.c 17 Oct 2003 19:38:08 -0000 +@@ -187,10 +187,21 @@ + hints.ai_family = PF_UNSPEC; + hints.ai_socktype = 0; + hints.ai_protocol = 0; +- ++ ++#ifdef AI_ADDRCONFIG ++ hints.ai_flags |= AI_ADDRCONFIG; ++#endif ++ + if ((retval = getaddrinfo (name, NULL, &hints, &res)) != 0) { +- *herr = ai_to_herr (retval); +- return -1; ++#ifdef AI_ADDRCONFIG ++ hints.ai_flags &= ~AI_ADDRCONFIG; ++ if ((retval != EAI_BADFLAGS) || (retval = getaddrinfo (name, NULL, &hints, &res)) != 0) { ++#endif ++ *herr = ai_to_herr (retval); ++ return -1; ++#ifdef AI_ADDRCONFIG ++ } ++#endif + } + + len = ALIGN (strlen (res->ai_canonname) + 1); -- 2.44.0