diff options
-rw-r--r-- | cli-agentfwd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli-agentfwd.c b/cli-agentfwd.c index c7df788..eed4a6a 100644 --- a/cli-agentfwd.c +++ b/cli-agentfwd.c @@ -79,6 +79,10 @@ static int new_agent_chan(struct Channel * channel) { return SSH_OPEN_ADMINISTRATIVELY_PROHIBITED; fd = connect_agent(); + if (cli_opts.agent_fd < 0) { + dropbear_log(LOG_INFO, "Failed to connect to agent"); + return SSH_OPEN_CONNECT_FAILED; + } setnonblocking(fd); |