version 1.343, 2015/05/08 03:25:07 |
version 1.344, 2015/06/05 15:13:13 |
|
|
char ntop[NI_MAXHOST], strport[NI_MAXSERV]; |
char ntop[NI_MAXHOST], strport[NI_MAXSERV]; |
in_port_t *lport_p; |
in_port_t *lport_p; |
|
|
host = (type == SSH_CHANNEL_RPORT_LISTENER) ? |
|
fwd->listen_host : fwd->connect_host; |
|
is_client = (type == SSH_CHANNEL_PORT_LISTENER); |
is_client = (type == SSH_CHANNEL_PORT_LISTENER); |
|
|
if (host == NULL) { |
if (is_client && fwd->connect_path != NULL) { |
error("No forward host name."); |
host = fwd->connect_path; |
return 0; |
} else { |
} |
host = (type == SSH_CHANNEL_RPORT_LISTENER) ? |
if (strlen(host) >= NI_MAXHOST) { |
fwd->listen_host : fwd->connect_host; |
error("Forward host name too long."); |
if (host == NULL) { |
return 0; |
error("No forward host name."); |
|
return 0; |
|
} |
|
if (strlen(host) >= NI_MAXHOST) { |
|
error("Forward host name too long."); |
|
return 0; |
|
} |
} |
} |
|
|
/* Determine the bind address, cf. channel_fwd_bind_addr() comment */ |
/* Determine the bind address, cf. channel_fwd_bind_addr() comment */ |