mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 10:35:40 +08:00
Use parsehostname in TransparentPlugin
This commit is contained in:
parent
2c8bf28065
commit
4bb706d140
@ -56,15 +56,8 @@ static FILTER_ACTION transparent_filter_client(void *fo, struct clientparam * pa
|
||||
param->sincl = param->srv->intsa;
|
||||
}
|
||||
#endif
|
||||
addrbuf[i++] = '[';
|
||||
i += pl->myinet_ntop(*SAFAMILY(¶m->req), SAADDR(¶m->req), (char *)addrbuf + i, sizeof(addrbuf));
|
||||
sprintf((char *)addrbuf+i, "]:%hu", ntohs(*SAPORT(¶m->req)));
|
||||
#ifdef mystrdup
|
||||
#undef mystrdup
|
||||
#undef myfree
|
||||
#endif
|
||||
if(param->hostname) pl->myfree(param->hostname);
|
||||
param->hostname = pl->mystrdup(addrbuf);
|
||||
pl->myinet_ntop(*SAFAMILY(¶m->req), SAADDR(¶m->req), (char *)addrbuf, sizeof(addrbuf));
|
||||
pl->parsehostname(addrbuf, param, ntohs(*SAPORT(¶m->req)));
|
||||
return PASS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user