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

Diff for /src/usr.bin/ssh/canohost.c between version 1.67 and 1.68

version 1.67, 2013/05/17 00:13:13 version 1.68, 2013/10/14 23:28:22
Line 45 
Line 45 
 get_remote_hostname(int sock, int use_dns)  get_remote_hostname(int sock, int use_dns)
 {  {
         struct sockaddr_storage from;          struct sockaddr_storage from;
         int i;  
         socklen_t fromlen;          socklen_t fromlen;
         struct addrinfo hints, *ai, *aitop;          struct addrinfo hints, *ai, *aitop;
         char name[NI_MAXHOST], ntop[NI_MAXHOST], ntop2[NI_MAXHOST];          char name[NI_MAXHOST], ntop[NI_MAXHOST], ntop2[NI_MAXHOST];
Line 91 
Line 90 
                 return xstrdup(ntop);                  return xstrdup(ntop);
         }          }
   
         /*          /* Names are stores in lowercase. */
          * Convert it to all lowercase (which is expected by the rest          lowercase(name);
          * of this software).  
          */  
         for (i = 0; name[i]; i++)  
                 if (isupper(name[i]))  
                         name[i] = (char)tolower(name[i]);  
         /*          /*
          * Map it back to an IP address and check that the given           * Map it back to an IP address and check that the given
          * address actually is an address of this host.  This is           * address actually is an address of this host.  This is

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.68