# HG changeset patch # User Matt Johnston # Date 1249055493 0 # Node ID a900cb1c53fa6f47b3667baa6d9d9bf03cc50637 # Parent 541ebf5bf0f6806fde624a5c93e5d94c7f4691f9 - Handle failure to connect to forwarding socket diff -r 541ebf5bf0f6 -r a900cb1c53fa cli-agentfwd.c --- a/cli-agentfwd.c Thu Jul 30 15:15:12 2009 +0000 +++ b/cli-agentfwd.c Fri Jul 31 15:51:33 2009 +0000 @@ -79,6 +79,10 @@ 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);