diff options
Diffstat (limited to 'canohost.c')
-rw-r--r-- | canohost.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/canohost.c b/canohost.c index 69e8e6f6d..a8eeb0e35 100644 --- a/canohost.c +++ b/canohost.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: canohost.c,v 1.67 2013/05/17 00:13:13 djm Exp $ */ | 1 | /* $OpenBSD: canohost.c,v 1.68 2013/10/14 23:28:22 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -48,7 +48,6 @@ static char * | |||
48 | get_remote_hostname(int sock, int use_dns) | 48 | get_remote_hostname(int sock, int use_dns) |
49 | { | 49 | { |
50 | struct sockaddr_storage from; | 50 | struct sockaddr_storage from; |
51 | int i; | ||
52 | socklen_t fromlen; | 51 | socklen_t fromlen; |
53 | struct addrinfo hints, *ai, *aitop; | 52 | struct addrinfo hints, *ai, *aitop; |
54 | char name[NI_MAXHOST], ntop[NI_MAXHOST], ntop2[NI_MAXHOST]; | 53 | char name[NI_MAXHOST], ntop[NI_MAXHOST], ntop2[NI_MAXHOST]; |
@@ -99,13 +98,9 @@ get_remote_hostname(int sock, int use_dns) | |||
99 | return xstrdup(ntop); | 98 | return xstrdup(ntop); |
100 | } | 99 | } |
101 | 100 | ||
102 | /* | 101 | /* Names are stores in lowercase. */ |
103 | * Convert it to all lowercase (which is expected by the rest | 102 | lowercase(name); |
104 | * of this software). | 103 | |
105 | */ | ||
106 | for (i = 0; name[i]; i++) | ||
107 | if (isupper(name[i])) | ||
108 | name[i] = (char)tolower(name[i]); | ||
109 | /* | 104 | /* |
110 | * Map it back to an IP address and check that the given | 105 | * Map it back to an IP address and check that the given |
111 | * address actually is an address of this host. This is | 106 | * address actually is an address of this host. This is |