]> git.pld-linux.org Git - packages/evolution.git/commitdiff
- use AI_ADDRCONFIG if available to avoid returning IPv6 addresses to hosts
authorgrzegol <grzegol@pld-linux.org>
Thu, 20 Nov 2003 15:13:25 +0000 (15:13 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  without an IPv6 interface

Changed files:
    evolution-addrconfig.patch -> 1.1

evolution-addrconfig.patch [new file with mode: 0644]

diff --git a/evolution-addrconfig.patch b/evolution-addrconfig.patch
new file mode 100644 (file)
index 0000000..ad9f307
--- /dev/null
@@ -0,0 +1,38 @@
+2003-10-16  Jeremy Katz  <katzj@redhat.com>
+
+       * 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);
This page took 0.371875 seconds and 4 git commands to generate.