[BACK]Return to whois.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / whois

Diff for /src/usr.bin/whois/whois.c between version 1.56 and 1.57

version 1.56, 2017/07/26 15:48:38 version 1.57, 2018/06/17 15:34:54
Line 278 
Line 278 
  * If the TLD is a number, query ARIN, otherwise, use TLD.whois-server.net.   * If the TLD is a number, query ARIN, otherwise, use TLD.whois-server.net.
  * If the domain does not contain '.', check to see if it is an NSI handle   * If the domain does not contain '.', check to see if it is an NSI handle
  * (starts with '!') or a CORE handle (COCO-[0-9]+ or COHO-[0-9]+) or an   * (starts with '!') or a CORE handle (COCO-[0-9]+ or COHO-[0-9]+) or an
  * ASN (starts with AS). Fall back to NICHOST for the non-handle case.   * ASN (starts with AS) or IPv6 address (contains ':'). Fall back to
    * NICHOST for the non-handle and non-IPv6 case.
  */   */
 char *  char *
 choose_server(const char *name, const char *country, char **tofree)  choose_server(const char *name, const char *country, char **tofree)
Line 305 
Line 306 
                 else if ((strncasecmp(name, "AS", 2) == 0) &&                  else if ((strncasecmp(name, "AS", 2) == 0) &&
                     strtol(name + 2, &ep, 10) > 0 && *ep == '\0')                      strtol(name + 2, &ep, 10) > 0 && *ep == '\0')
                         return (MNICHOST);                          return (MNICHOST);
                   else if (strchr(name, ':') != NULL) /* IPv6 address */
                           return (ANICHOST);
                 else                  else
                         return (NICHOST);                          return (NICHOST);
         } else if (isdigit((unsigned char)*(++qhead)))          } else if (isdigit((unsigned char)*(++qhead)))

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57