commit-inetutils
[Top][All Lists]
Advanced

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

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-110-g2dfa2


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-110-g2dfa2d2
Date: Thu, 7 May 2020 08:09:21 -0400 (EDT)

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 <address@hidden>
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  <address@hidden>
 
+       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  <address@hidden>
+
        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 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]