[git] ADNS-g10 - branch, master, updated. adns-1.4-g10-6-18-g0d2f647

by Werner Koch cvs at cvs.gnupg.org
Fri Nov 20 15:36:13 CET 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ADNS migrated to autotools/libtool".

The branch, master has been updated
       via  0d2f64783f35bbae58a5eeabcaf234d04dccfdbc (commit)
       via  c363fb22d3ce24552ab97572e348d2b024a9f16a (commit)
       via  07a5efec6709a5d597feac2eb8b3b948761ddcda (commit)
       via  9ebe8804fea36faf28de7a1ec24eefcd496be1d0 (commit)
       via  fdc5d4de3455aa74b3806575c4aca2437891898e (commit)
       via  f94e51db5a7f2d3e44c7574a86c10ca945b51dfc (commit)
      from  95b256a42bfbe5df1f60440567e5db2cab438e1f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0d2f64783f35bbae58a5eeabcaf234d04dccfdbc
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Nov 20 15:32:22 2015 +0100

    Post release updates
    
    --

diff --git a/NEWS b/NEWS
index cd34ee5..819f148 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Noteworthy changes in version 1.4-g10-8 (unreleased) [C5/A4/R_]
+----------------------------------------------------
+
+
 Noteworthy changes in version 1.4-g10-7 (2015-11-20) [C5/A4/R0]
 ----------------------------------------------------
 
diff --git a/configure.ac b/configure.ac
index b4e9159..cdaa11f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ min_automake_version="1.14"
 # bump the version number immediately *after* the release and do
 # another commit and push so that the git magic is able to work.
 # See below for the LT version numbers.
-m4_define([mym4_version], [1.4-g10-7])
+m4_define([mym4_version], [1.4-g10-8])
 
 # Below is m4 magic to extract and compute the git revision number,
 # the decimalized short revision number, a beta version string and a

commit c363fb22d3ce24552ab97572e348d2b024a9f16a
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Nov 20 14:41:31 2015 +0100

    Release 1.4-g10-7.
    
    * configure.ac: Bump LT version to C5/A4/R0.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/NEWS b/NEWS
index c4cd807..cd34ee5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,13 @@
-Noteworthy changes in version 1.4-g10-7 (unreleased)
+Noteworthy changes in version 1.4-g10-7 (2015-11-20) [C5/A4/R0]
 ----------------------------------------------------
 
+ * Implement a mode to use a public nameserver via Tor.  This
+   introduces two new config options and a new init flag.
 
-Noteworthy changes in version 1.4-g10-6 (2015-04-13)
+ * Fix use of TCP under Windows.
+
+
+Noteworthy changes in version 1.4-g10-6 (2015-04-13) [C4/A4/R3]
 ----------------------------------------------------
 
  * Fix building for Windows with newer versions of Mingw.
diff --git a/configure.ac b/configure.ac
index 45ab374..b4e9159 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,9 +52,9 @@ AC_INIT([adns], [mym4_full_version], [bug-adns at g10code.com])
 #   (Interfaces added:      CURRENT++, AGE++, REVISION=0)
 #   (No interfaces changed:                   REVISION++)
 # Please remember to document interface changes in the NEWS file.
-ADNS_LT_CURRENT=4
-ADNS_LT_AGE=3
-ADNS_LT_REVISION=3
+ADNS_LT_CURRENT=5
+ADNS_LT_AGE=4
+ADNS_LT_REVISION=0
 
 # If the API is changed in an incompatible way: increment this counter.
 ADNS_CONFIG_API_VERSION=1

commit 07a5efec6709a5d597feac2eb8b3b948761ddcda
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Nov 20 13:26:35 2015 +0100

    w32: Fix printf format mismatch.
    
    --

diff --git a/src/setup.c b/src/setup.c
index c33e2c5..3c9b13c 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -654,7 +654,7 @@ read_w32_init_files (adns_state ads) {
     case ERROR_INVALID_PARAMETER: network_err_str = "ERROR_INVALID_PARAMETER"; break;
     case ERROR_NO_DATA: network_err_str = "ERROR_NO_DATA"; break;
     case ERROR_NOT_SUPPORTED: network_err_str = "ERROR_NOT_SUPPORTED"; break;}
-    adns__diag(ads,-1,0,"GetNetworkParams() failed with error [%d] %s",
+    adns__diag(ads,-1,0,"GetNetworkParams() failed with error [%lu] %s",
                network_info_result,network_err_str);
     }
   else {

commit 9ebe8804fea36faf28de7a1ec24eefcd496be1d0
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Nov 20 12:47:24 2015 +0100

    w32: Make adns__sock_writev actually work.
    
    * src/w32support.c (adns__sock_writev): No error checking for alloca
    needed.
    --
    
    ... and the old error checking was plainly wrong.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/src/w32support.c b/src/w32support.c
index 67b6b83..4d7bb64 100644
--- a/src/w32support.c
+++ b/src/w32support.c
@@ -13,20 +13,20 @@
  *    Copyright (C) 1999-2000,2003,2006  Tony Finch
  *    Copyright (C) 1991 Massachusetts Institute of Technology
  *  (See the file INSTALL for full details.)
- *  
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2, or (at your option)
  *  any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software Foundation,
- *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
+ *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
 #ifndef HAVE_W32_SYSTEM
@@ -63,7 +63,7 @@ DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved)
       if (!wsa_startup_failed)
         WSACleanup ();
     }
-  
+
   return TRUE;
 }
 
@@ -175,26 +175,23 @@ adns__sock_sendto (int fd, void *buffer, size_t size, int flags,
    [Taken and modified from the adns 1.0 W32 port.  Note that the
     original version never worked; that is adns via TCP did not worked
     with W32.].  */
-int 
+int
 adns__sock_writev (int fd, const struct iovec *iov, int iovcount)
 {
   size_t total_len = 0;
   int rc, i;
   char *buf, *p;
-	
+
   for (i=0; i < iovcount; i++)
     total_len += iov[i].iov_len;
-	
+
   p = buf = alloca (total_len);
-  if (buf)
-    return -1;
-	
   for (i=0; i < iovcount; i++)
     {
       memcpy (p, iov[i].iov_base, iov[i].iov_len);
       p += iov[i].iov_len;
     }
-  
+
   rc = send (fd, buf, total_len, 0);
   if (rc)
     errno = adns__sock_wsa2errno (WSAGetLastError());
@@ -203,7 +200,7 @@ adns__sock_writev (int fd, const struct iovec *iov, int iovcount)
 
 
 int
-adns__sock_close (int fd) 
+adns__sock_close (int fd)
 {
   int rc = closesocket(fd);
   if (rc)
@@ -226,18 +223,18 @@ adns__sock_select (int nfds, fd_set *rset, fd_set *wset, fd_set *xset,
 
 
 /* inet_aton implementation.  [Taken from the adns 1.0 W32 port.
-   Copyright (C) 2000, 2004 Jarle (jgaa) Aase <jgaa at jgaa.com>] 
+   Copyright (C) 2000, 2004 Jarle (jgaa) Aase <jgaa at jgaa.com>]
 
    Returns true if the address is valid, false if not. */
-int 
+int
 adns__inet_aton (const char *cp, struct in_addr *inp)
 {
   if (!cp || !*cp || !inp)
     {
       errno = EINVAL;
-      return 0; 
+      return 0;
     }
-  
+
   if (!strcmp(cp, "255.255.255.255"))
     {
       /*  Although this is a valid address, the old inet_addr function
@@ -245,7 +242,7 @@ adns__inet_aton (const char *cp, struct in_addr *inp)
         inp->s_addr = INADDR_NONE;
         return 1;
     }
-  
+
   inp->s_addr = inet_addr (cp);
   return (inp->s_addr != INADDR_NONE);
 }

commit fdc5d4de3455aa74b3806575c4aca2437891898e
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Nov 20 13:15:40 2015 +0100

    Also try port 9150 in Tor mode.
    
    * src/w32support.c (ECONNREFUSED):  Define if missing.
    (adns__sock_wsa2errno): Map WSAECONNREFUSED.
    * src/event.c (socks_connect): Try port 9150.
    --
    
    The Tor browser uses this port.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/src/event.c b/src/event.c
index 6f5c095..1738ed7 100644
--- a/src/event.c
+++ b/src/event.c
@@ -194,6 +194,12 @@ socks_connect (adns_state ads, int fd,
   proxyaddr = (struct sockaddr *)&proxyaddr_in;
   proxyaddrlen = sizeof proxyaddr_in;
   ret = adns__sock_connect(fd, proxyaddr, proxyaddrlen);
+  if (ret && errno == ECONNREFUSED)
+    {
+      /* Assume the Tor browser is used.  */
+      proxyaddr_in.sin_port = htons (9150);
+      ret = adns__sock_connect(fd, proxyaddr, proxyaddrlen);
+    }
   if (ret)
     return ret;
 
diff --git a/src/w32support.c b/src/w32support.c
index fcf86aa..67b6b83 100644
--- a/src/w32support.c
+++ b/src/w32support.c
@@ -41,6 +41,12 @@
 
 static int wsa_startup_failed;
 
+/* Define missing error codes for older Windows compilers.  */
+#ifndef ECONNREFUSED
+#define ECONNREFUSED 107
+#endif
+
+
 
 int WINAPI
 DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved)
@@ -81,6 +87,8 @@ adns__sock_wsa2errno (int err)
       return ENOBUFS;
     case WSAEMSGSIZE:
       return EMSGSIZE;
+    case WSAECONNREFUSED:
+      return ECONNREFUSED;
     default:
       return EIO;
     }

commit f94e51db5a7f2d3e44c7574a86c10ca945b51dfc
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Nov 19 11:41:03 2015 +0100

    w32: Allow building with older toolchains.
    
    * src/event.c [W32]: Add replaement errno values.
    --
    
    The mingw-w64 toolchain in Debian Wheezy seems to miss a few error
    codes.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/src/event.c b/src/event.c
index 064fbd9..6f5c095 100644
--- a/src/event.c
+++ b/src/event.c
@@ -43,6 +43,36 @@
 #include "internal.h"
 #include "tvarith.h"
 
+
+/* Define missing error codes for older Windows compilers.  */
+#ifdef HAVE_W32_SYSTEM
+# ifndef ENOTSUP
+# define ENOTSUP 129
+# endif
+# ifndef EPROTO
+# define EPROTO 134
+# endif
+# ifndef EPROTONOSUPPORT
+# define EPROTONOSUPPORT 135
+# endif
+# ifndef ENETDOWN
+# define ENETDOWN 116
+# endif
+# ifndef ENETUNREACH
+# define ENETUNREACH 118
+# endif
+# ifndef EHOSTUNREACH
+# define EHOSTUNREACH 110
+# endif
+# ifndef ECONNREFUSED
+# define ECONNREFUSED 107
+# endif
+# ifndef ETIMEDOUT
+# define ETIMEDOUT 138
+# endif
+#endif/*HAVE_W32_SYSTEM*/
+
+
 /* TCP connection management. */
 
 static void tcp_close(adns_state ads) {

-----------------------------------------------------------------------

Summary of changes:
 NEWS             | 13 +++++++++++--
 configure.ac     |  8 ++++----
 src/event.c      | 36 ++++++++++++++++++++++++++++++++++++
 src/setup.c      |  2 +-
 src/w32support.c | 41 +++++++++++++++++++++++------------------
 5 files changed, 75 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
ADNS migrated to autotools/libtool
http://git.gnupg.org




More information about the Gnupg-commits mailing list