Fixed handling of [] IPv6 addresses in hostnames

This commit is contained in:
z3APA3A committed 2015-11-29 12:38:16 +03:00
1 parent 271d9bb91a
commit 74772de341
1 file changed
+1 -1
+1 -1
View File
@@ -250,7 +250,7 @@ int parsehostname(char *hostname, struct clientparam *param, unsigned short port
if(sp){
port = atoi(sp+1);
}
getip46(param->srv->family, param->hostname + (se!=0), (struct sockaddr *)&param->req);
getip46(param->srv->family, param->hostname, (struct sockaddr *)&param->req);
if(se) *se = ']';
if(sp) *sp = ':';
*SAPORT(&param->req) = htons(port);