mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-24 02:55: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;
|
param->sincl = param->srv->intsa;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
addrbuf[i++] = '[';
|
pl->myinet_ntop(*SAFAMILY(¶m->req), SAADDR(¶m->req), (char *)addrbuf, sizeof(addrbuf));
|
||||||
i += pl->myinet_ntop(*SAFAMILY(¶m->req), SAADDR(¶m->req), (char *)addrbuf + i, sizeof(addrbuf));
|
pl->parsehostname(addrbuf, param, ntohs(*SAPORT(¶m->req)));
|
||||||
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);
|
|
||||||
return PASS;
|
return PASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user