From MAILER-DAEMON Sat May 02 06:38:22 2020
Received: from list by lists.gnu.org with archive (Exim 4.90_1)
	id 1jUpXJ-0002r2-Ui
	for mharc-commit-inetutils@gnu.org; Sat, 02 May 2020 06:38:21 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53486)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <tim.ruehsen@gmx.de>)
 id 1jUpXH-0002mF-N4
 for commit-inetutils@gnu.org; Sat, 02 May 2020 06:38:20 -0400
Received: from vcs0.savannah.gnu.org ([209.51.188.201]:37052)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <tim.ruehsen@gmx.de>) id 1jUpXH-0007nG-Cc
 for commit-inetutils@gnu.org; Sat, 02 May 2020 06:38:19 -0400
Received: by vcs0.savannah.gnu.org (Postfix, from userid 124176)
 id 4749F20B5B; Sat,  2 May 2020 06:38:19 -0400 (EDT)
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
 updated. inetutils-1_9_4-107-g100cfe0
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 83cfe7afd39afd3dbd36bf7d6fecaf1af61e035a
X-Git-Newrev: 100cfe0866b3aa60dd2cd78a379b1bfc691423f9
Message-Id: <20200502103819.4749F20B5B@vcs0.savannah.gnu.org>
Date: Sat,  2 May 2020 06:38:18 -0400 (EDT)
From: tim.ruehsen@gmx.de (Tim Ruehsen)
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
 <commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 02 May 2020 10:38:20 -0000

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 "GNU Inetutils ".

The branch, master has been updated
       via  100cfe0866b3aa60dd2cd78a379b1bfc691423f9 (commit)
      from  83cfe7afd39afd3dbd36bf7d6fecaf1af61e035a (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 -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=100cfe0866b3aa60dd2cd78a379b1bfc691423f9


commit 100cfe0866b3aa60dd2cd78a379b1bfc691423f9
Author: Tim Rühsen <tim.ruehsen@gmx.de>
Date:   Sun Mar 1 11:51:53 2020 +0100

    telnet: Use memove for overlapping memory instead of strncpy

diff --git a/ChangeLog b/ChangeLog
index 96490b5..4fa4640 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2020-04-27  Tim Rühsen  <tim.ruehsen@gmx.de>
+
+	telnet: Use memove for overlapping memory instead of strncpy.
+
+	Overlapping source and destination buffers are not supported
+	by strncpy and give undefined results.
+
+	7.24.2.3 of ISO/IEC 9899:201x:
+	"If  copying  takes  place  between  objects  thatoverlap,
+	the behavior is undefined."
+
+	* telnet/commands.c (cmds): Use memove for overlapping memory
+	instead of strncpy.
+
 2020-04-12  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	whois: Delegation of IP and AS.
diff --git a/telnet/commands.c b/telnet/commands.c
index 29b2bfd..ca3010b 100644
--- a/telnet/commands.c
+++ b/telnet/commands.c
@@ -3108,11 +3108,11 @@ cmdrc (char *m1, char *m2)
 	  if (isspace (line[0]))
 	    continue;
 	  if (strncasecmp (line, m1, l1) == 0)
-	    strncpy (line, &line[l1], sizeof (line) - l1);
+	    memmove (line, &line[l1], strlen(&line[l1]) + 1);
 	  else if (strncasecmp (line, m2, l2) == 0)
-	    strncpy (line, &line[l2], sizeof (line) - l2);
+	    memmove (line, &line[l2], strlen(&line[l2]) + 1);
 	  else if (strncasecmp (line, "DEFAULT", 7) == 0)
-	    strncpy (line, &line[7], sizeof (line) - 7);
+	    memmove (line, &line[7], strlen(&line[7]) + 1);
 	  else
 	    continue;
 	  if (line[0] != ' ' && line[0] != '\t' && line[0] != '\n')

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

Summary of changes:
 ChangeLog         | 14 ++++++++++++++
 telnet/commands.c |  6 +++---
 2 files changed, 17 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed May 06 18:37:03 2020
Received: from list by lists.gnu.org with archive (Exim 4.90_1)
	id 1jWSf1-0002qh-7u
	for mharc-commit-inetutils@gnu.org; Wed, 06 May 2020 18:37:03 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36800)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gnu@gisladisker.se>)
 id 1jWSez-0002qZ-7S
 for commit-inetutils@gnu.org; Wed, 06 May 2020 18:37:01 -0400
Received: from vcs0.savannah.gnu.org ([209.51.188.201]:35380)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <gnu@gisladisker.se>) id 1jWSey-000753-M7
 for commit-inetutils@gnu.org; Wed, 06 May 2020 18:37:00 -0400
Received: by vcs0.savannah.gnu.org (Postfix, from userid 117592)
 id 92C6520A15; Wed,  6 May 2020 18:37:00 -0400 (EDT)
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
 updated. inetutils-1_9_4-109-g546c6c3
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 100cfe0866b3aa60dd2cd78a379b1bfc691423f9
X-Git-Newrev: 546c6c385d46674c7955aede58985b2b4ac09216
Message-Id: <20200506223700.92C6520A15@vcs0.savannah.gnu.org>
Date: Wed,  6 May 2020 18:37:00 -0400 (EDT)
From: gnu@gisladisker.se (Mats Erik Andersson)
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
 <commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 06 May 2020 22:37:01 -0000

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 "GNU Inetutils ".

The branch, master has been updated
       via  546c6c385d46674c7955aede58985b2b4ac09216 (commit)
       via  8899eaae0d237c63b48b35503c496cc90388b680 (commit)
      from  100cfe0866b3aa60dd2cd78a379b1bfc691423f9 (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 -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=546c6c385d46674c7955aede58985b2b4ac09216


commit 546c6c385d46674c7955aede58985b2b4ac09216
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu May 7 00:33:10 2020 +0200

    whois: Improved hiding of legal disclaimers.
    
    Let hiding detect more than one instance, and add some few patterns
    relevant for servers running at the present time.

diff --git a/ChangeLog b/ChangeLog
index 3de8196..21a2e24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2020-05-07  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	whois: Improved hiding of legal disclaimers.
+
+	* whois/as_del_list: Two additional delegations.
+	* whois/data.h (hide_strings): Add string patterns for present
+	day services at ARIN, LACNIC, and RIPE.
+	* whois/whois.c (do_query): After successful location of a stop
+	pattern, go back into search state, instead of cancelling further
+	matching.  The service at ARIN inserts identical disclaimer at
+	the beginning, as well as at the end of a response.
+
 2020-05-06  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	* bootstrap: Updated from gnulib.
diff --git a/whois/as_del_list b/whois/as_del_list
index c99befc..48e69c6 100644
--- a/whois/as_del_list
+++ b/whois/as_del_list
@@ -36,6 +36,8 @@
 9216	10239	apnic
 12288	13311	ripe
 15360	16383	ripe
+23552	24575	apnic
+24576	25599	ripe
 47104	48127	ripe
 48128	49151	ripe
 49152	52223	ripe
diff --git a/whois/data.h b/whois/data.h
index 3046647..88c5c36 100644
--- a/whois/data.h
+++ b/whois/data.h
@@ -80,6 +80,10 @@ const char *hide_strings[] = {
   "Signature Domains' Whois Service", "agree to abide by the above",
   "Access to ASNIC", "by this policy.",
   "* Copyright (C) 1998 by SGNIC", "* modification.",
+  "% The RIPE Database is subject", "\n",
+  "% This query was served", "\n",
+  "% Copyright LACNIC", "%  only for lawful",
+  "# ARIN WHOIS data and services", "# Copyright 19",
   NULL, NULL
 };
 
diff --git a/whois/whois.c b/whois/whois.c
index 9a3b78a..373b7ae 100644
--- a/whois/whois.c
+++ b/whois/whois.c
@@ -477,7 +477,7 @@ do_query (const int sock, const char *query)
 	{
 	  if (strncmp (buf, hide_strings[i + 1], strlen (hide_strings[i + 1]))
 	      == 0)
-	    hide = 2;		/* stop hiding */
+	    hide = 0;		/* go into testing mode */
 	  continue;		/* hide this line */
 	}
       if (hide == 0)

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=8899eaae0d237c63b48b35503c496cc90388b680


commit 8899eaae0d237c63b48b35503c496cc90388b680
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Wed May 6 23:20:33 2020 +0200

    bootstrap: Update from gnulib.

diff --git a/ChangeLog b/ChangeLog
index 4fa4640..3de8196 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2020-05-06  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	* bootstrap: Updated from gnulib.
+
 2020-04-27  Tim Rühsen  <tim.ruehsen@gmx.de>
 
 	telnet: Use memove for overlapping memory instead of strncpy.
diff --git a/bootstrap b/bootstrap
index 70fd73c..8f76d69 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2019-01-04.17; # UTC
+scriptversion=2020-04-13.15; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -970,7 +970,7 @@ bootstrap_post_import_hook \
 # Uninitialized submodules are listed with an initial dash.
 if $use_git && git submodule | grep '^-' >/dev/null; then
   die "some git submodules are not initialized. "     \
-      "Run 'git submodule init' and bootstrap again."
+      "Run 'git submodule update --init' and bootstrap again."
 fi
 
 # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some

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

Summary of changes:
 ChangeLog         | 16 ++++++++++++++++
 bootstrap         |  4 ++--
 whois/as_del_list |  2 ++
 whois/data.h      |  4 ++++
 whois/whois.c     |  2 +-
 5 files changed, 25 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Thu May 07 08:09:25 2020
Received: from list by lists.gnu.org with archive (Exim 4.90_1)
	id 1jWfLB-0008SA-06
	for mharc-commit-inetutils@gnu.org; Thu, 07 May 2020 08:09:25 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39478)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gnu@gisladisker.se>)
 id 1jWfL9-0008Rf-3z
 for commit-inetutils@gnu.org; Thu, 07 May 2020 08:09:23 -0400
Received: from vcs0.savannah.gnu.org ([209.51.188.201]:50117)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <gnu@gisladisker.se>) id 1jWfL7-0007KA-Rf
 for commit-inetutils@gnu.org; Thu, 07 May 2020 08:09:21 -0400
Received: by vcs0.savannah.gnu.org (Postfix, from userid 117592)
 id ADFEC20A15; Thu,  7 May 2020 08:09:21 -0400 (EDT)
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
 updated. inetutils-1_9_4-110-g2dfa2d2
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 546c6c385d46674c7955aede58985b2b4ac09216
X-Git-Newrev: 2dfa2d20aa2842d3e01a5ae3fa085746d1a07f47
Message-Id: <20200507120921.ADFEC20A15@vcs0.savannah.gnu.org>
Date: Thu,  7 May 2020 08:09:21 -0400 (EDT)
From: gnu@gisladisker.se (Mats Erik Andersson)
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
 <commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 May 2020 12:09:23 -0000

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 "GNU Inetutils ".

The branch, master has been updated
       via  2dfa2d20aa2842d3e01a5ae3fa085746d1a07f47 (commit)
      from  546c6c385d46674c7955aede58985b2b4ac09216 (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 -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=2dfa2d20aa2842d3e01a5ae3fa085746d1a07f47


commit 2dfa2d20aa2842d3e01a5ae3fa085746d1a07f47
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Thu May 7 13:58:57 2020 +0200

    whois: Tweak command line arguments.
    
    Adjust parser to deliver a responsive server to any IPv6 query.

diff --git a/ChangeLog b/ChangeLog
index 21a2e24..06930e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2020-05-07  Mats Erik Andersson  <gnu@gisladisker.se>
 
+	whois: Tweak command line arguments.
+
+	* whois/whois.c (whichwhois): Skip any single character token,
+	as it must be a search directive for a server.  Prune the known
+	IPv6 delegations to reflect only the valid one.  Use ARIN as
+	default IPv6 serving instance, since the old 6BONE server is no
+	longer responsive.
+
+2020-05-07  Mats Erik Andersson  <gnu@gisladisker.se>
+
 	whois: Improved hiding of legal disclaimers.
 
 	* whois/as_del_list: Two additional delegations.
diff --git a/whois/whois.c b/whois/whois.c
index 373b7ae..7a4817b 100644
--- a/whois/whois.c
+++ b/whois/whois.c
@@ -301,6 +301,12 @@ whichwhois (const char *s)
   unsigned long ip;
   unsigned int i;
 
+  /* Step over any single glyph preamble, as it must be some
+   * kind of informed instructions for an anticipated server.
+   */
+  while ((*s != '\0') && (*(s + 1) != '\0') && (*(s + 1) == ' '))
+    s += 2;
+
   /* -v or -t has been used */
   if (*s == '\0')
     return "whois.ripe.net";
@@ -308,14 +314,12 @@ whichwhois (const char *s)
   /* IPv6 address */
   if (strchr (s, ':'))
     {
-      if (strncasecmp (s, "2001:2", 6) == 0)	/* XXX ugly hack! */
-	return "whois.apnic.net";
-      if (strncasecmp (s, "2001:4", 6) == 0)
-	return "whois.arin.net";
-      if (strncasecmp (s, "2001:6", 6) == 0)
+      /* Temporary hack until a delegation list is implemented.  */
+      /* The only easily found /20 delegation .  */
+      if (strncasecmp (s, "2001:2", 6) == 0)
 	return "whois.ripe.net";
-      /* if (strncasecmp(s, "3ffe", 4) == 0) */
-      return "whois.6bone.net";
+
+      return "whois.arin.net";
     }
 
   /* email address */

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

Summary of changes:
 ChangeLog     | 10 ++++++++++
 whois/whois.c | 18 +++++++++++-------
 2 files changed, 21 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sat May 09 18:54:52 2020
Received: from list by lists.gnu.org with archive (Exim 4.90_1)
	id 1jXYMu-0006cN-Ia
	for mharc-commit-inetutils@gnu.org; Sat, 09 May 2020 18:54:52 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46534)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gnu@gisladisker.se>)
 id 1jXYMs-0006c1-Fh
 for commit-inetutils@gnu.org; Sat, 09 May 2020 18:54:50 -0400
Received: from vcs0.savannah.gnu.org ([209.51.188.201]:54016)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <gnu@gisladisker.se>) id 1jXYMs-0000CO-2l
 for commit-inetutils@gnu.org; Sat, 09 May 2020 18:54:50 -0400
Received: by vcs0.savannah.gnu.org (Postfix, from userid 117592)
 id 037E020B2F; Sat,  9 May 2020 18:54:49 -0400 (EDT)
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
 updated. inetutils-1_9_4-112-g30e26e4
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2dfa2d20aa2842d3e01a5ae3fa085746d1a07f47
X-Git-Newrev: 30e26e4c2fac84bda713b8c687d9f6555ea0eed6
Message-Id: <20200509225450.037E020B2F@vcs0.savannah.gnu.org>
Date: Sat,  9 May 2020 18:54:49 -0400 (EDT)
From: gnu@gisladisker.se (Mats Erik Andersson)
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
 <commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 09 May 2020 22:54:50 -0000

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 "GNU Inetutils ".

The branch, master has been updated
       via  30e26e4c2fac84bda713b8c687d9f6555ea0eed6 (commit)
       via  6b47c25d621dc0bc88371836c77f2e4612ba4eef (commit)
      from  2dfa2d20aa2842d3e01a5ae3fa085746d1a07f47 (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 -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=30e26e4c2fac84bda713b8c687d9f6555ea0eed6


commit 30e26e4c2fac84bda713b8c687d9f6555ea0eed6
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sat May 9 23:52:51 2020 +0200

    whois: Delegation list for IPv6 ranges.
    
    Add code to match IPv6 queries against a data structure,
    which records known address delegations.  These provide
    prefixes of length at most 32 bits, and the corresponding
    server's name.

diff --git a/ChangeLog b/ChangeLog
index 05065d5..4648070 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2020-05-08  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	whois: Delegation list for IPv6 ranges.
+
+	* whois/.gitignore: Add `ip6_del.h'.
+	* whois/Makefile.am (BUILT_SOURCES): Add `ip6_del.h'.
+	(EXTRA_DIST): Add `ip6_del_list', `ip6_del.h', `make_ip6_del.pl'.
+	(noinst_HEADERS): Add `ip6_del.h'.
+	(ip6_del.h): New target.
+	* whois/data.h (ip6_assign): New array.
+	* whois/ip6_del_list: New file.
+	* whois/make_ip6_del.pl: New file.
+	* whois/whois.c (whichwhois): Regard absence of period, colon,
+	and hyphen as evidence of NSI NIC or ASN.  Test for this and for
+	email address before any test for numeric addressing.  Implement
+	code for IPv6 delegation matching, to be triggered by the presence
+	of a colon in the given query string.
+
 2020-05-07  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	whois: Tweak command line arguments.
diff --git a/whois/.gitignore b/whois/.gitignore
index 6e0d83f..186c3a9 100644
--- a/whois/.gitignore
+++ b/whois/.gitignore
@@ -1,4 +1,5 @@
 whois
 as_del.h
 ip_del.h
+ip6_del.h
 tld_serv.h
diff --git a/whois/Makefile.am b/whois/Makefile.am
index c5265d6..7278dbc 100644
--- a/whois/Makefile.am
+++ b/whois/Makefile.am
@@ -26,13 +26,13 @@ EXTRA_PROGRAMS = whois
 
 whois_SOURCES = whois.c
 
-EXTRA_DIST = as_del_list ip_del_list tld_serv_list \
-  make_as_del.pl  make_ip_del.pl make_tld_serv.pl \
-  as_del.h ip_del.h tld_serv.h
+EXTRA_DIST = as_del_list ip_del_list ip6_del_list tld_serv_list \
+  make_as_del.pl  make_ip_del.pl make_ip6_del.pl make_tld_serv.pl \
+  as_del.h ip_del.h ip6_del.h tld_serv.h
 
-noinst_HEADERS = data.h as_del.h ip_del.h tld_serv.h whois.h
+noinst_HEADERS = data.h as_del.h ip_del.h ip6_del.h tld_serv.h whois.h
 
-BUILT_SOURCES = as_del.h ip_del.h tld_serv.h
+BUILT_SOURCES = as_del.h ip_del.h ip6_del.h tld_serv.h
 
 as_del.h: $(srcdir)/as_del_list $(srcdir)/make_as_del.pl
 	LANG=C perl $(srcdir)/make_as_del.pl < $(srcdir)/as_del_list > as_del.h
@@ -40,5 +40,8 @@ as_del.h: $(srcdir)/as_del_list $(srcdir)/make_as_del.pl
 ip_del.h: $(srcdir)/ip_del_list $(srcdir)/make_ip_del.pl
 	LANG=C perl $(srcdir)/make_ip_del.pl < $(srcdir)/ip_del_list > ip_del.h
 
+ip6_del.h: $(srcdir)/ip6_del_list $(srcdir)/make_ip6_del.pl
+	LANG=C perl $(srcdir)/make_ip6_del.pl < $(srcdir)/ip6_del_list > ip6_del.h
+
 tld_serv.h: $(srcdir)/tld_serv_list $(srcdir)/make_tld_serv.pl
 	LANG=C perl $(srcdir)/make_tld_serv.pl < $(srcdir)/tld_serv_list > tld_serv.h
diff --git a/whois/data.h b/whois/data.h
index 88c5c36..5e013b2 100644
--- a/whois/data.h
+++ b/whois/data.h
@@ -111,6 +111,11 @@ struct ip_del ip_assign[] = {
   {0, 0, NULL}
 };
 
+struct ip_del ip6_assign[] = {
+#include "ip6_del.h"
+  {0, 0, NULL}
+};
+
 struct as_del
 {
   unsigned short first;
diff --git a/whois/ip6_del_list b/whois/ip6_del_list
new file mode 100644
index 0000000..db21d28
--- /dev/null
+++ b/whois/ip6_del_list
@@ -0,0 +1,43 @@
+# Copyright (C) 2020 Free Software Foundation, Inc.
+#
+# This file is part of GNU Inetutils.
+#
+# GNU Inetutils 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 3 of the License, or (at
+# your option) any later version.
+#
+# GNU Inetutils 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, see `http://www.gnu.org/licenses/'.
+
+# Accepted format of entry line:
+#
+#     hex:hex::/num	ripe	# comments
+#     hex:hex::/num	whois.arin.net
+#
+# where HEX are hexadecimal numbers of at most four significant digits,
+# and NUM are decimal numbers in the range 1 to 32, inclusive.
+
+# The default hard-coded server is ARIN.
+# The first established match is chosen as query server.
+
+2001:2000::/20	ripe
+2001:3000::/21	ripe
+2001:3800::/22	ripe
+
+2001:4000::/23	ripe
+2001:4200::/23	afrinic
+2001:4400::/23	apnic
+2001:4600::/23	ripe
+2001:4a00::/23	ripe
+2001:4c00::/23	ripe
+
+2400:0::/12	apnic
+2800:0::/12	lacnic
+2a00:0::/11	ripe
+2c00:0::/12	afrinic
diff --git a/whois/make_ip6_del.pl b/whois/make_ip6_del.pl
new file mode 100755
index 0000000..9b1ac87
--- /dev/null
+++ b/whois/make_ip6_del.pl
@@ -0,0 +1,67 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2020 Free Software Foundation, Inc.
+#
+# This file is part of GNU Inetutils.
+#
+# GNU Inetutils 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 3 of the License, or (at
+# your option) any later version.
+#
+# GNU Inetutils 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, see `http://www.gnu.org/licenses/'.
+
+use strict;
+use warnings;
+
+# Accepted format of entry line:
+#
+#     hex:hex::/num	ripe	# comments
+#     hex:hex::/num	whois.arin.net
+#
+# where HEX are hexadecimal numbers of at most four significant digits,
+# and NUM are decimal numbers in the range 1 to 32, inclusive.
+
+my $prefix = qr/^([[:xdigit:]]{1,4}:[[:xdigit:]]{1,4})::\/(\d+)\s+([\w\.]+)$/;
+
+while (<>) {
+  # Sanitize input: strip comments after hash character,
+  #   discard leading and ending space, drop empty lines.
+  chomp;
+
+  s/^\s*(.*)\s*$/$1/;
+  s/\s*#.*$//;
+
+  next if /^$/;
+
+  # Check for acceptable data format.
+  die "Prefix is not parseable: \"$_\".\n"
+    unless (/$prefix/);
+
+  my ($i1, $i2) = (0, 0);
+
+  ($i1, $i2) = split /:/, $1;	# Prefix components, two double-octets.
+
+  my $masklen = $2;	# Prefix length
+  my $server = $3;	# Delegation target
+
+  die "Illegal prefix length: $masklen used in \"$1/$masklen\".\n"
+    if $masklen == 0 or $masklen > 32;
+
+  print "{ " . ((oct("0x" . $i1) << 16) + oct("0x" . $i2)) . "UL, " .
+    (0xffffffff^(0xffffffff >> $masklen)) . "UL, \"";
+
+  if ($server =~ /\./) {
+    print "$server";
+  } else {
+    print "whois.$server.net";
+  }
+
+  print "\" },\n";
+}
diff --git a/whois/whois.c b/whois/whois.c
index 7a4817b..84e0cc9 100644
--- a/whois/whois.c
+++ b/whois/whois.c
@@ -311,23 +311,12 @@ whichwhois (const char *s)
   if (*s == '\0')
     return "whois.ripe.net";
 
-  /* IPv6 address */
-  if (strchr (s, ':'))
-    {
-      /* Temporary hack until a delegation list is implemented.  */
-      /* The only easily found /20 delegation .  */
-      if (strncasecmp (s, "2001:2", 6) == 0)
-	return "whois.ripe.net";
-
-      return "whois.arin.net";
-    }
-
   /* email address */
   if (strchr (s, '@'))
     return "";
 
-  /* no dot and no hyphen means it's a NSI NIC handle or ASN (?) */
-  if (!strpbrk (s, ".-"))
+  /* no dot, no colon, and no hyphen means it's an NSI NIC handle or ASN (?) */
+  if (!strpbrk (s, ".-:"))
     {
       const char *p;
 
@@ -343,6 +332,31 @@ whichwhois (const char *s)
 	return "";
     }
 
+  /* IPv6 address */
+  if (strchr (s, ':'))
+    {
+      int a = 0, b = 0;
+
+      /* Only the first two double-octets are ever scanned.
+       * At least one is required.
+       */
+      if (sscanf (s, "%x:%x:", &a, &b) == 0)
+	return "";
+
+      /* Mask off any non-significant bits and generate prefix.  */
+      ip = (a & 0xffff) << 16 | (b & 0xffff);
+
+      for (i = 0; ip6_assign[i].serv; i++)
+	if ((ip & ip6_assign[i].mask) == ip6_assign[i].net)
+	  return ip6_assign[i].serv;
+
+      if (verb)
+	puts (_("Delegation server of this address is not known.\n"
+		"The fallback is ARIN, hoping for success."));
+
+      return "whois.arin.net";
+    }
+
   /* smells like an IP? */
   if ((ip = myinet_aton (s)))
     {

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=6b47c25d621dc0bc88371836c77f2e4612ba4eef


commit 6b47c25d621dc0bc88371836c77f2e4612ba4eef
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sat May 9 22:58:38 2020 +0200

    Update ChangeLog, giving some more details.
    
    Fix comment in two files to match present code.

diff --git a/ChangeLog b/ChangeLog
index 06930e1..05065d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -102,12 +102,14 @@
 	uucpd: Fix buffer overflows.
 
 	This fixes several missing string termination issues with strncpy.
-	Also REMOTEHOST with size NI_MAXHOST was strcpy'ed into LINE which
+	Also REMOTEHOST of size NI_MAXHOST was strcpy'ed into LINE, which
 	just had 32 bytes on the stack.
 
-	* src/uucpd.c (dologout): Increase LINE size.  Use exisiting SCPYN
+	* src/uucpd.c (SCPYN): Promote macro to global scope, but expand
+	its action by writing the final NUL character.
+	(dologin): Increase size of LINE.  Use existing macro SCPYN
 	instead of strncpy.
-	(SCPYN): New macro.
+	[PATH_LASTLOG && HAVE_STRUCT_LASTLOG]: Delete local macro SCPYN.
 
 2020-02-29  Tim Rühsen <tim.ruehsen@gmx.de>
 
@@ -116,23 +118,22 @@
 	Usernames >= 56 bytes would overflow the char arrays Username and
 	Logname.  This change mitigates this, but still silently truncates
 	these arrays.  Silent truncation should be checked throughout the
-	code possibly within a more comprehensive code review.
+	code, possibly within a more comprehensive code review.
 
-	* src/uucpd.c (Usernaem, Logname): Increase size to 72 bytes.
+	* src/uucpd.c (Username, Logname): Increase size to 72 bytes.
 	(doit): Use snprintf instead of sprintf.
 
 2020-02-29  Tim Rühsen <tim.ruehsen@gmx.de>
 
 	telnet: Use strdup instead malloc+strcpy.
 
-	* telnet/commands.c (tn): Use strdup instead malloc/strcpy.
+	* telnet/commands.c (tn): Assign HOSTNAME using strdup().
 
 2020-02-29  Tim Rühsen <tim.ruehsen@gmx.de>
 
 	telnet: Fix -Wsign-compare in suboption.
 
-	* telnet/telnet.c (suboption): Explicit cast to int to silence
-	-Wsign-compare.
+	* telnet/telnet.c (suboption): Explicitly cast sizeof() to int.
 
 2020-02-29  Tim Rühsen <tim.ruehsen@gmx.de>
 
@@ -174,7 +175,7 @@
 
 	ftp: Fix return value of remglob.
 
-	* ftp/cmds.c (remglob): Turn around NULL check.
+	* ftp/cmds.c (remglob): Switch roles of old values after NULL check.
 
 2020-02-29  Tim Rühsen <tim.ruehsen@gmx.de>
 
@@ -184,7 +185,7 @@
 
 2020-02-29  Tim Rühsen <tim.ruehsen@gmx.de>
 
-	ftp: Fix 2x misuse of strncpy (read buffer overflow).
+	ftp: Fix two misuses of strncpy (read buffer overflow).
 
 	* ftp/ftp.c (pswitch): Correctly set the terminating NUL.
 
@@ -198,30 +199,31 @@
 
 	whois: Silence -Wimplicit-fallthrough.
 
-	* whois/whois.c (main): Squeelch warnings.
+	* whois/whois.c (main): Squeelch warning.
 
 2020-02-29  Tim Rühsen <tim.ruehsen@gmx.de>
 
 	ping, ping6: Silence -Wimplicit-fallthrough.
 
-	* ping/ping.c (parse_opt): Squeelch warnings.
+	* ping/ping.c (parse_opt): Squeelch warning.
 	* ping/ping6.c (parse_opt): Likewise.
 
 2020-02-17  Tim Rühsen <tim.ruehsen@gmx.de>
 
 	ping6: Fix memleak in ping_set_dest.
 
-	* ping/ping6.c (ping_set_dest): Rerrange code to avoid memory
-	leak.
-	* ping/ping6.h (ping_set_dest): Change type; update callees.
+	* ping/ping6.c (ping_set_dest): New function signature.
+	Rearrange code to avoid memory leak.
+	* ping/ping6.h (ping_set_dest): Change signature in declaration.
 
 2020-02-17  Tim Rühsen <tim.ruehsen@gmx.de>
 
 	ping: Fix memleak in ping_set_dest.
 
-	* ping/libping.c (ping_set_dest): Rerrange code to avoid memory
-	leak.
-	* ping/ping.h (ping_set_dest): Change type; update callees.
+	* ping/libping.c (ping_set_dest): New function signature.
+	Rearrange code to avoid memory leak.
+	[HAVE_DECL_GETADDRINFO]: Rename P as RHOST.
+	* ping/ping.h (ping_set_dest): Change signature in declaration.
 
 2020-02-16  Tim Rühsen <tim.ruehsen@gmx.de>
 
@@ -251,9 +253,10 @@
 	telnet: Fix silent truncation (off-by-one check)
 
 	If the DISPLAY variable had exactly 44 bytes, the SE byte (end sub
-	negotiation) was silently truncated.
+	negotiation) was silently truncated.  This concerns CVE-2019-0053.
 
-	* telnet/telnet.c (suboption): Use >= instead of >.
+	* telnet/telnet.c (suboption): Add case of equality in conditional,
+	supplementing strict inequality.
 
 2020-02-21  Mats Erik Andersson  <gnu@gisladisker.se>
 
diff --git a/ftp/cmds.c b/ftp/cmds.c
index 283e5b8..6ae88e7 100644
--- a/ftp/cmds.c
+++ b/ftp/cmds.c
@@ -1240,7 +1240,7 @@ sethash (int argc _GL_UNUSED_PARAMETER, char **argv)
 	{
 	case 'g':
 	case 'G':
-	  hashbytes *= 1024 * 1024 * 1024;	/* Cascaded multiplication!  */
+	  hashbytes *= 1024 * 1024 * 1024;
 	  break;
 	case 'm':
 	case 'M':
diff --git a/ping/libping.c b/ping/libping.c
index 9bfd9a1..92cd775 100644
--- a/ping/libping.c
+++ b/ping/libping.c
@@ -296,7 +296,7 @@ ping_set_dest (PING * ping, const char *host)
   char *rhost;
 
 # if defined HAVE_IDN || defined HAVE_IDN2
-  rc = idna_to_ascii_lz (host, &rhost, 0);	/* P is allocated.  */
+  rc = idna_to_ascii_lz (host, &rhost, 0);	/* RHOST is allocated.  */
   if (rc)
     return 1;
   host = rhost;

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

Summary of changes:
 ChangeLog                         | 61 +++++++++++++++++++++++------------
 ftp/cmds.c                        |  2 +-
 ping/libping.c                    |  2 +-
 whois/.gitignore                  |  1 +
 whois/Makefile.am                 | 13 +++++---
 whois/data.h                      |  5 +++
 Makefile.am => whois/ip6_del_list | 43 +++++++++++++------------
 whois/make_ip6_del.pl             | 67 +++++++++++++++++++++++++++++++++++++++
 whois/whois.c                     | 40 +++++++++++++++--------
 9 files changed, 174 insertions(+), 60 deletions(-)
 copy Makefile.am => whois/ip6_del_list (51%)
 create mode 100755 whois/make_ip6_del.pl


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sun May 10 10:32:28 2020
Received: from list by lists.gnu.org with archive (Exim 4.90_1)
	id 1jXn0F-0000jA-SU
	for mharc-commit-inetutils@gnu.org; Sun, 10 May 2020 10:32:27 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46904)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gnu@gisladisker.se>)
 id 1jXn0E-0000iz-6g
 for commit-inetutils@gnu.org; Sun, 10 May 2020 10:32:26 -0400
Received: from vcs0.savannah.gnu.org ([209.51.188.201]:48663)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <gnu@gisladisker.se>) id 1jXn0D-0002xg-NH
 for commit-inetutils@gnu.org; Sun, 10 May 2020 10:32:25 -0400
Received: by vcs0.savannah.gnu.org (Postfix, from userid 117592)
 id AB584209DC; Sun, 10 May 2020 10:32:25 -0400 (EDT)
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
 updated. inetutils-1_9_4-113-g276e7dc
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 30e26e4c2fac84bda713b8c687d9f6555ea0eed6
X-Git-Newrev: 276e7dc49f700cc4b3fb6c31af19eefc22125ae1
Message-Id: <20200510143225.AB584209DC@vcs0.savannah.gnu.org>
Date: Sun, 10 May 2020 10:32:25 -0400 (EDT)
From: gnu@gisladisker.se (Mats Erik Andersson)
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
 <commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 10 May 2020 14:32:26 -0000

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 "GNU Inetutils ".

The branch, master has been updated
       via  276e7dc49f700cc4b3fb6c31af19eefc22125ae1 (commit)
      from  30e26e4c2fac84bda713b8c687d9f6555ea0eed6 (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 -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=276e7dc49f700cc4b3fb6c31af19eefc22125ae1


commit 276e7dc49f700cc4b3fb6c31af19eefc22125ae1
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Sun May 10 16:22:31 2020 +0200

    whois: Add more IPv6 delegation prefixes.
    
    The new delegations were tried against the mirror list published
    by gnu.org, until at least one IPv6 address per country was detected.
    Only one Japanese server, using an IANA-reserved address, did not fit
    as expected when queried with `whois'.  A further test run against
    HTTP mirrors of OpenBSD was able to explain all addresses correctly.

diff --git a/ChangeLog b/ChangeLog
index 4648070..d9f52a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-10  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	* whois/data.h (hide_strings): Add Brazilian pattern.
+	* whois/ip6_del_list: Update with more ranges.
+
 2020-05-08  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	whois: Delegation list for IPv6 ranges.
diff --git a/whois/data.h b/whois/data.h
index 5e013b2..182dcee 100644
--- a/whois/data.h
+++ b/whois/data.h
@@ -83,6 +83,7 @@ const char *hide_strings[] = {
   "% The RIPE Database is subject", "\n",
   "% This query was served", "\n",
   "% Copyright LACNIC", "%  only for lawful",
+  "% Copyright (c) Nic.br", "%  any similar purpose",
   "# ARIN WHOIS data and services", "# Copyright 19",
   NULL, NULL
 };
diff --git a/whois/ip6_del_list b/whois/ip6_del_list
index db21d28..02d0638 100644
--- a/whois/ip6_del_list
+++ b/whois/ip6_del_list
@@ -26,9 +26,18 @@
 # The default hard-coded server is ARIN.
 # The first established match is chosen as query server.
 
-2001:2000::/20	ripe
-2001:3000::/21	ripe
-2001:3800::/22	ripe
+2001:200::/23	apnic
+2001:600::/23	ripe
+2001:800::/23	ripe
+2001:a00::/23	ripe
+2001:c00::/22	apnic
+
+2001:1200::/23	lacnic
+2001:1400::/22	ripe
+2001:1a00::/23	ripe
+2001:1c00::/22	ripe
+
+2001:2000::/19	ripe
 
 2001:4000::/23	ripe
 2001:4200::/23	afrinic
@@ -37,6 +46,11 @@
 2001:4a00::/23	ripe
 2001:4c00::/23	ripe
 
+2001:5000::/20	ripe
+2001:8000::/18	apnic
+
+2003:0::/18	ripe
+
 2400:0::/12	apnic
 2800:0::/12	lacnic
 2a00:0::/11	ripe

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

Summary of changes:
 ChangeLog          |  5 +++++
 whois/data.h       |  1 +
 whois/ip6_del_list | 20 +++++++++++++++++---
 3 files changed, 23 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


