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

Diff for /src/usr.bin/ssh/dns.c between version 1.24 and 1.25

version 1.24, 2007/01/03 03:01:40 version 1.25, 2008/06/12 00:03:49
Line 142 
Line 142 
 {  {
         struct addrinfo hints, *ai;          struct addrinfo hints, *ai;
   
           /*
            * We shouldn't ever get a null host but if we do then log an error
            * and return -1 which stops DNS key fingerprint processing.
            */
           if (hostname == NULL) {
                   error("is_numeric_hostname called with NULL hostname");
                   return -1;
           }
   
         memset(&hints, 0, sizeof(hints));          memset(&hints, 0, sizeof(hints));
         hints.ai_socktype = SOCK_DGRAM;          hints.ai_socktype = SOCK_DGRAM;
         hints.ai_flags = AI_NUMERICHOST;          hints.ai_flags = AI_NUMERICHOST;
   
         if (getaddrinfo(hostname, "0", &hints, &ai) == 0) {          if (getaddrinfo(hostname, NULL, &hints, &ai) == 0) {
                 freeaddrinfo(ai);                  freeaddrinfo(ai);
                 return -1;                  return -1;
         }          }

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25