From 1ea7943996efccdfbe912b3685c8c96fe83be0f0 Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Fri, 6 Oct 2006 18:47:53 +0200 Subject: [PATCH] Imported Debian version 4.7.18 --- config.h | 2 +- data.h | 1 - debian/changelog | 10 ++++++++++ ip6_del_list | 1 + make_ip6_del.pl | 2 ++ tld_serv_list | 6 +++--- whois.c | 20 ++++++++++++++++++++ whois.h | 1 + whois.spec | 2 +- 9 files changed, 39 insertions(+), 6 deletions(-) diff --git a/config.h b/config.h index c3fac30..e8a7fca 100644 --- a/config.h +++ b/config.h @@ -1,6 +1,6 @@ /* Program version */ /* not for the inetutils version */ -#define VERSION "4.7.17" +#define VERSION "4.7.18" /* Configurable features */ diff --git a/data.h b/data.h index fbba5c2..edf9f14 100644 --- a/data.h +++ b/data.h @@ -24,7 +24,6 @@ const char *ripe_servers[] = { "whois.nic.ir", "whois.nic.ck", "whois.ra.net", - "whois.radb.net", NULL }; diff --git a/debian/changelog b/debian/changelog index a7a9257..3e9c9c5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +whois (4.7.18) unstable; urgency=medium + + * whois.radb.net does not understand the RIPE protocol anymore. + * Added support for IPv6 Teredo addresses, contributed by Rémi + Denis-Courmont. (Closes: #384373) + * Updated the .mobi and .gs TLD servers. (Closes: #389880, 391447) + * Added the .gd TLD server. + + -- Marco d'Itri Fri, 6 Oct 2006 18:47:53 +0200 + whois (4.7.17) unstable; urgency=medium * 4.7.16 did not ask whois.denic.de for the complete data. Fixed. diff --git a/ip6_del_list b/ip6_del_list index ce9094a..171e3c6 100644 --- a/ip6_del_list +++ b/ip6_del_list @@ -2,6 +2,7 @@ # The parser is very simple-minded and wants the two first components of # addresses. It does not deal with networks == 0 or > 24 bit. +2001:0000::/32 teredo 2001:0200::/23 apnic 2001:0400::/23 arin 2001:0600::/23 ripe diff --git a/make_ip6_del.pl b/make_ip6_del.pl index 94b85b8..d94629e 100755 --- a/make_ip6_del.pl +++ b/make_ip6_del.pl @@ -26,6 +26,8 @@ while (<>) { print $s; } elsif ($s eq '6to4') { print "\\x0A"; + } elsif ($s eq 'teredo') { + print "\\x0B"; } elsif ($s eq 'UNALLOCATED') { print "\\006"; } else { diff --git a/tld_serv_list b/tld_serv_list index 6145e8c..32ec7c1 100644 --- a/tld_serv_list +++ b/tld_serv_list @@ -37,7 +37,7 @@ e164.arpa whois.ripe.net .coop whois.nic.coop .info whois.afilias.info .jobs whois.jobs -.mobi WEB http://pc.mtld.mobi/whois/ +.mobi whois.dotmobiregistry.net .museum whois.museum .name whois.nic.name .pro whois.registrypro.pro @@ -121,7 +121,7 @@ e164.arpa whois.ripe.net #.fx .ga NONE # www.nic.ga .gb NONE -#.gd # NO NIC (UPR) +.gd whois.adamsnames.tc .ge WEB http://whois.sanet.ge/ .gf whois.nplus.gf .gg whois.channelisles.net @@ -133,7 +133,7 @@ e164.arpa whois.ripe.net .gp whois.nic.gp #.gq # NO NIC http://www.getesa.gq/ .gr WEB https://grweb.ics.forth.gr/Whois?lang=en -.gs whois.adamsnames.tc +.gs whois.nic.gs .gt WEB http://www.gt/whois.htm .gu WEB http://gadao.gov.gu/domainsearch.htm #.gw # no NIC? diff --git a/whois.c b/whois.c index ac8e1f1..adeae0e 100644 --- a/whois.c +++ b/whois.c @@ -248,6 +248,12 @@ const char *handle_query(const char *hserver, const char *hport, /* XXX should fail if server[0] < ' ' */ qstring = p; /* XXX leak */ break; + case 0x0B: + p = convert_teredo(qstring); + printf(_("\nQuerying for the IPv4 endpoint %s of a Teredo IPv6 address.\n\n"), p); + server = whichwhois(p); + qstring = p ; + break; default: break; } @@ -842,6 +848,20 @@ char *convert_6to4(const char *s) return new; } +char *convert_teredo(const char *s) +{ + char *new = malloc(sizeof("255.255.255.255")); + unsigned int a, b; + + if (sscanf(s, "2001:%*[^:]:%*[^:]:%*[^:]:%*[^:]:%*[^:]:%x:%x", &a, &b) != 2) + return (char *) "0.0.0.0"; + + a ^= 0xffff; + b ^= 0xffff; + sprintf(new, "%d.%d.%d.%d", a >> 8, a & 0xff, b >> 8, b & 0xff); + return new; +} + unsigned long myinet_aton(const char *s) { unsigned long a, b, c, d; diff --git a/whois.h b/whois.h index ddf931e..7fe800b 100644 --- a/whois.h +++ b/whois.h @@ -27,6 +27,7 @@ int domcmp(const char *, const char *); int domfind(const char *, const char *[]); char *normalize_domain(const char *); char *convert_6to4(const char *); +char *convert_teredo(const char *); const char *handle_query(const char *server, const char *port, const char *qstring, const char *fstring); void split_server_port(const char *const input, const char **server, diff --git a/whois.spec b/whois.spec index 639da3b..ff1348f 100644 --- a/whois.spec +++ b/whois.spec @@ -1,6 +1,6 @@ Summary: Enhanced WHOIS client Name: whois -Version: 4.7.17 +Version: 4.7.18 Release: 1 License: GPL Vendor: Marco d'Itri