You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Goldstein Lyor (JIRA)" <ji...@apache.org> on 2018/08/22 09:53:00 UTC
[jira] [Comment Edited] (SSHD-839) Possible bug in
DefaultForwardingFilter class
[ https://issues.apache.org/jira/browse/SSHD-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16588641#comment-16588641 ]
Goldstein Lyor edited comment on SSHD-839 at 8/22/18 9:52 AM:
--------------------------------------------------------------
It seems you are correct and there may be a bug:
{quote}startLocalPortForwarding(127.0.0.1:51080 -> 192.168.50.97:46321): 127.0.0.1:51080{quote}
This means that the user has asked for a tunnel that *LISTEN(s)* on port _51080_ and forwards any incoming connection to {{192.168.50.97}} on port _46321_. Therefore the bound *local* address is indeed {{127.0.0.1:51080}} - i.e., the one that serves to listen on incoming connections.
{quote}stopLocalPortForwarding(127.0.0.1:51080) unbind 192.168.50.97:46321{quote}
Therefore should unbind port _51080_
was (Author: lgoldstein):
It seems you are correct and there may be a bug:
{quote}startLocalPortForwarding(127.0.0.1:51080 -> 192.168.50.97:46321): 127.0.0.1:51080{quote}
This means that the user has asked for a tunnel that *LISTEN(s)* on port _51080_ and forwards any incoming connection to {{192.168.50.97}} on port _46321_. Therefore the bound *local* address is indeed {{127.0.0.1:51080}} - i.e., the one that serves to listen on incoming connections.
{quote}stopLocalPortForwarding(127.0.0.1:51080) unbind 192.168.50.97:46321{quote}
Therefore should unbind port _51080_
Please re-open if you believe there is a flaw.
> Possible bug in DefaultForwardingFilter class
> ---------------------------------------------
>
> Key: SSHD-839
> URL: https://issues.apache.org/jira/browse/SSHD-839
> Project: MINA SSHD
> Issue Type: Bug
> Affects Versions: 2.0.1
> Reporter: Roberto Deandrea
> Priority: Major
>
> Hi, I found a possible bug in method stopLocalPortForwarding() of class DefaultForwardingFilter.
> The effect is that the port bound IS NOT unbound after calling this method.
> For example :
> 2018-08-08 15:28:02.054 [CMDSRV-2] DEBUG o.a.s.c.i.n.Nio2Acceptor.bind - Binding Nio2Acceptor to address /127.0.0.1:51080
> 2018-08-08 15:28:02.054 [CMDSRV-2] DEBUG o.a.s.c.f.DefaultForwardingFilter.startLocalPortForwarding - startLocalPortForwarding(127.0.0.1:51080 -> 192.168.50.97:46321): 127.0.0.1:51080
>
> 2018-08-08 15:28:21.025 [] DEBUG o.a.s.c.f.DefaultForwardingFilter.stopLocalPortForwarding - stopLocalPortForwarding(127.0.0.1:51080) unbind 192.168.50.97:46321
> The port bound is 51080 on localhost(127.0.0.1).
> This port is not unbounded.
> I think that the problem is on this statement :
> acceptor.unbind(bound.toInetSocketAddress());
> The statement SHOULD BE instead :
> acceptor.unbind(local.toInetSocketAddress());
>
> Let me know what you think about this issue.
> Thank you in advance
> Roberto
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)