mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lyor Goldstein (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SSHD-964) SSH_MSG_CHANNEL_EOF never sent or received for local and remote port forwarding
Date Thu, 30 Jan 2020 21:59:00 GMT

    [ https://issues.apache.org/jira/browse/SSHD-964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17027031#comment-17027031

Lyor Goldstein commented on SSHD-964:

Hi [~roberto.deandrea] sorry to bother you, but after reviewing the code for {{sendEof}} I
decided to make a slight adjustment to it - basically bypass the regular {{writePacket}} which
I reverted to allow sending channel messages only if channel is open (see below). I am sure
it did not damage this issue's functionality, but I would feel better if you would be so kind
as to run a sanity test on it from your part.


protected ... sendEof() {
        Session s = getSession();
        Buffer buffer = s.createBuffer(SshConstants.SSH_MSG_CHANNEL_EOF, Short.SIZE);
         * The default "writePacket" does not send packets if state
         * is not open so we need to bypass it.
        return s.writePacket(buffer);

    public IoWriteFuture writePacket(Buffer buffer) throws IOException {
        if (!isClosing()) {
            Session s = getSession();
            return s.writePacket(buffer);

        if (log.isDebugEnabled()) {
            log.debug("writePacket({}) Discarding output packet because channel state={}",
this, state);
        return new AbstractIoWriteFuture(toString(), null) {
                setValue(new EOFException("Channel is being closed"));

> SSH_MSG_CHANNEL_EOF never sent or received for local and remote port forwarding
> -------------------------------------------------------------------------------
>                 Key: SSHD-964
>                 URL: https://issues.apache.org/jira/browse/SSHD-964
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 2.3.0, 2.3.1
>            Reporter: Roberto Deandrea
>            Assignee: Lyor Goldstein
>            Priority: Major
> We found that the message SSH_MSG_CHANNEL_EOF is never sent or received for local and
remote port forwarding connections.
> We found probably the issue and we changed the code locally in a couple of java classes
to fix this issue.
> Let me know if we can commit our changes in a pull request (into a specific Apache SSHD
branch) so that you can peer review the changes  and decide if you can accept them...
> Kind Regards
> Roberto Deandrea

This message was sent by Atlassian Jira

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org

View raw message