mirror of
https://repo.or.cz/socat.git
synced 2025-07-14 15:23:24 +00:00
Fixed ignoring of explicit socksport in socks5 addresses (regression)
This commit is contained in:
parent
5e56f25285
commit
e7df880af5
4 changed files with 10 additions and 1 deletions
|
@ -239,7 +239,8 @@ int _xioopen_opt_socksport(
|
|||
{
|
||||
struct servent *se;
|
||||
|
||||
if (retropt_string(opts, OPT_SOCKSPORT, socksport) < 0) {
|
||||
if (retropt_string(opts, OPT_SOCKSPORT, socksport) < 0 &&
|
||||
*socksport == NULL) {
|
||||
if ((se = getservbyname("socks", "tcp")) != NULL) {
|
||||
Debug1("\"socks/tcp\" resolves to %u", ntohs(se->s_port));
|
||||
if ((*socksport = Malloc(6)) == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue