Fixed handling of [] IPv6 addresses in hostnames

This commit is contained in:
z3APA3A 2015-11-29 12:38:16 +03:00
parent 271d9bb91a
commit 74772de341

View File

@ -250,7 +250,7 @@ int parsehostname(char *hostname, struct clientparam *param, unsigned short port
if(sp){ if(sp){
port = atoi(sp+1); 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(se) *se = ']';
if(sp) *sp = ':'; if(sp) *sp = ':';
*SAPORT(&param->req) = htons(port); *SAPORT(&param->req) = htons(port);