Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/netcat6 net/netcat6: Fix -t short option lost from...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5c5347354940
branches:  trunk
changeset: 437612:5c5347354940
user:      uwe <uwe%pkgsrc.org@localhost>
date:      Thu Aug 27 14:24:08 2020 +0000

description:
net/netcat6: Fix -t short option lost from optstring.
Don't mix AI_NUMERICHOST and AI_ADDRCONFIG.
Bump PKGREVISION.

diffstat:

 net/netcat6/Makefile                    |   4 +-
 net/netcat6/distinfo                    |   4 ++-
 net/netcat6/patches/patch-src_network.c |  45 +++++++++++++++++++++++++++++++++
 net/netcat6/patches/patch-src_parser.c  |  16 +++++++++++
 4 files changed, 66 insertions(+), 3 deletions(-)

diffs (98 lines):

diff -r 259ce8398b24 -r 5c5347354940 net/netcat6/Makefile
--- a/net/netcat6/Makefile      Thu Aug 27 13:57:14 2020 +0000
+++ b/net/netcat6/Makefile      Thu Aug 27 14:24:08 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.11 2020/01/26 17:31:53 rillig Exp $
+# $NetBSD: Makefile,v 1.12 2020/08/27 14:24:08 uwe Exp $
 
 DISTNAME=              nc6-1.0
 PKGNAME=               ${DISTNAME:S/nc/netcat/}
-PKGREVISION=           4
+PKGREVISION=           5
 CATEGORIES=            net
 MASTER_SITES=          ftp://ftp.deepspace6.net/pub/ds6/sources/nc6/
 MASTER_SITES+=         http://ftp.deepspace6.net/pub/ds6/sources/nc6/
diff -r 259ce8398b24 -r 5c5347354940 net/netcat6/distinfo
--- a/net/netcat6/distinfo      Thu Aug 27 13:57:14 2020 +0000
+++ b/net/netcat6/distinfo      Thu Aug 27 14:24:08 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2017/11/11 17:28:39 maya Exp $
+$NetBSD: distinfo,v 1.8 2020/08/27 14:24:08 uwe Exp $
 
 SHA1 (nc6-1.0.tar.bz2) = 1c361a8060be427fe1b2209d7155e26670e0c1b9
 RMD160 (nc6-1.0.tar.bz2) = c5444976925ffece7f27fc1ff3c16ebe19998b78
@@ -6,3 +6,5 @@
 Size (nc6-1.0.tar.bz2) = 264257 bytes
 SHA1 (patch-aa) = f1e941b277358c9f0922be977fa00b4b2f349230
 SHA1 (patch-src_misc.c) = 0d9d0bf4c273ede0ff4cb0bc405e6831339d1cb1
+SHA1 (patch-src_network.c) = 67bdbe3cb96d4636da3a71535594733ed5066aba
+SHA1 (patch-src_parser.c) = 6ec2f459933f09ac8bedcf570d7b993dfb67317f
diff -r 259ce8398b24 -r 5c5347354940 net/netcat6/patches/patch-src_network.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netcat6/patches/patch-src_network.c   Thu Aug 27 14:24:08 2020 +0000
@@ -0,0 +1,45 @@
+$NetBSD: patch-src_network.c,v 1.1 2020/08/27 14:24:08 uwe Exp $
+
+Do not set AI_ADDRCONFIG when we set AI_NUMERICHOST.  The semantic of
+this combination is vague and it does the wrong thing at least on some
+glibc versions.
+
+--- src/network.c.orig 2006-01-19 22:46:23.000000000 +0000
++++ src/network.c
+@@ -91,14 +91,14 @@ static int net_connect(const connection_
+       /* setup getaddrinfo hints */
+       memset(&hints, 0, sizeof(hints));
+       ca_to_addrinfo(&hints, attrs);
+-#ifdef HAVE_GETADDRINFO_AI_ADDRCONFIG
+-      /* make calls to getaddrinfo send AAAA queries only if at least one
+-       * IPv6 interface is configured */
+-      hints.ai_flags |= AI_ADDRCONFIG;
+-#endif
+       if (ca_is_flag_set(attrs, CA_NUMERIC_MODE))
+               hints.ai_flags |= AI_NUMERICHOST;
+-
++#ifdef HAVE_GETADDRINFO_AI_ADDRCONFIG
++      else
++              /* make calls to getaddrinfo send AAAA queries only if
++               * at least one IPv6 interface is configured */
++              hints.ai_flags |= AI_ADDRCONFIG;
++#endif
+       /* get addresses */
+       remote = ca_remote_address(attrs);
+       local = ca_local_address(attrs);
+@@ -157,11 +157,12 @@ static int net_listen(const connection_a
+       memset(&hints, 0, sizeof(hints));
+       ca_to_addrinfo(&hints, attrs);
+       hints.ai_flags = AI_PASSIVE;
+-#ifdef HAVE_GETADDRINFO_AI_ADDRCONFIG
+-      hints.ai_flags |= AI_ADDRCONFIG;
+-#endif
+       if (ca_is_flag_set(attrs, CA_NUMERIC_MODE))
+               hints.ai_flags |= AI_NUMERICHOST;
++#ifdef HAVE_GETADDRINFO_AI_ADDRCONFIG
++      else
++              hints.ai_flags |= AI_ADDRCONFIG;
++#endif
+ 
+       /* get addresses */
+       remote = ca_remote_address(attrs);
diff -r 259ce8398b24 -r 5c5347354940 net/netcat6/patches/patch-src_parser.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netcat6/patches/patch-src_parser.c    Thu Aug 27 14:24:08 2020 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_parser.c,v 1.1 2020/08/27 14:24:08 uwe Exp $
+
+To recognize -t (as the short version of --idle-timeout) it should be
+listed in the getopt's optstring too.
+
+--- src/parser.c.orig  2006-01-19 22:46:23.000000000 +0000
++++ src/parser.c
+@@ -160,7 +160,7 @@ void parse_arguments(int argc, char **ar
+       _verbosity_level = 0;
+ 
+       /* option recognition loop */
+-      while ((c = getopt_long(argc, argv, "46be:hlnp:q:s:uvw:xX",
++      while ((c = getopt_long(argc, argv, "46be:hlnp:q:s:t:uvw:xX",
+                               long_options, &option_index)) >= 0)
+       {
+               switch (c) {



Home | Main Index | Thread Index | Old Index