version 1.523, 2020/04/03 02:40:32 |
version 1.524, 2020/04/03 04:03:51 |
|
|
static void |
static void |
forwarding_success(void) |
forwarding_success(void) |
{ |
{ |
if (forward_confirms_pending > 0 && --forward_confirms_pending == 0) { |
if (forward_confirms_pending == -1) |
debug("All forwarding requests processed"); |
return; |
|
if (--forward_confirms_pending == 0) { |
|
debug("%s: all expected forwarding replies received"); |
if (fork_after_authentication_flag) |
if (fork_after_authentication_flag) |
fork_postauth(); |
fork_postauth(); |
|
} else { |
|
debug2("%s: %d expected forwarding replies remaining", |
|
__func__, forward_confirms_pending); |
} |
} |
} |
} |
|
|
|
|
int success = 0; |
int success = 0; |
int i; |
int i; |
|
|
|
if (options.exit_on_forward_failure) |
|
forward_confirms_pending = 0; /* track pending requests */ |
/* Initiate local TCP/IP port forwardings. */ |
/* Initiate local TCP/IP port forwardings. */ |
for (i = 0; i < options.num_local_forwards; i++) { |
for (i = 0; i < options.num_local_forwards; i++) { |
debug("Local connections to %.200s:%d forwarded to remote " |
debug("Local connections to %.200s:%d forwarded to remote " |
|
|
fatal("Could not request tunnel forwarding."); |
fatal("Could not request tunnel forwarding."); |
else |
else |
error("Could not request tunnel forwarding."); |
error("Could not request tunnel forwarding."); |
|
} |
|
if (forward_confirms_pending > 0) { |
|
debug("%s: expecting replies for %d forwards", __func__, |
|
forward_confirms_pending); |
} |
} |
} |
} |
|
|