Page MenuHomePhabricator

[queestion]-[libssh]-When physical link is down(for example:the network cable is pull out by people) ,the channel can not detect broken timely
Closed, ResolvedPublic

Description

When physical link is down(for example:the network cable is pull out by people) ,the channel can not detect broken timely,is there any way to promote?

our code is like below:

r = ssh_channel_poll_timeout(session->ti.libssh.channel, 0, 0);
 if (r < 1) {
     if (r == SSH_EOF) {
         sprintf(msg, "SSH channel unexpected EOF");
         session->status = NC_STATUS_INVALID;
         session->term_reason = NC_SESSION_TERM_DROPPED;
         ret = NC_PSPOLL_SESSION_TERM | NC_PSPOLL_SESSION_ERROR;
     } else if (r == SSH_ERROR) {
         sprintf(msg, "SSH channel poll error (%s)", ssh_get_error(session->ti.libssh.session));
         session->status = NC_STATUS_INVALID;
         session->term_reason = NC_SESSION_TERM_OTHER;
         ret = NC_PSPOLL_SESSION_TERM | NC_PSPOLL_SESSION_ERROR;
     } else {
         ret = NC_PSPOLL_TIMEOUT;
     }
     break;
 }

version 0.7.4 (released 2017-02-03)

  • Added id_ed25519 to the default identity list
  • Fixed sftp EOF packet handling
  • Fixed ssh_send_banner() to confirm with RFC 4253
  • Fixed some memory leaks

Event Timeline

ZhaoGuangYue1986 renamed this task from When physical link is down(for example:the network cable is pull out by people) ,the channel can not detect timely to [queestion]-[libssh]-When physical link is down(for example:the network cable is pull out by people) ,the channel can not detect timely.Wed, Jan 30, 7:11 AM
ZhaoGuangYue1986 renamed this task from [queestion]-[libssh]-When physical link is down(for example:the network cable is pull out by people) ,the channel can not detect timely to [queestion]-[libssh]-When physical link is down(for example:the network cable is pull out by people) ,the channel can not detect broken timely.Wed, Jan 30, 7:26 AM
ZhaoGuangYue1986 updated the task description. (Show Details)
ZhaoGuangYue1986 updated the task description. (Show Details)
asn added a subscriber: asn.Thu, Feb 7, 2:50 PM

The timeout issues should be better with 0.8. Please update. Feel free to reopen if you have the same issues with 0.9 which will be released soon.

asn closed this task as Resolved.Thu, Feb 7, 2:50 PM
asn claimed this task.