[ 
https://issues.apache.org/jira/browse/SSHD-1293?focusedWorklogId=810362&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-810362
 ]

ASF GitHub Bot logged work on SSHD-1293:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Sep/22 11:47
            Start Date: 20/Sep/22 11:47
    Worklog Time Spent: 10m 
      Work Description: knalli commented on PR #241:
URL: https://github.com/apache/mina-sshd/pull/241#issuecomment-1252237200

   Oh, alright 🫠 
   
   I've seen there are some changes in the forwarding topic in the meanwhile. 
Is it worth to check if there are other leaking situations maybe there? Or at 
least checking the tests cover the actual invocations (as noted in my 2nd 
comment here)?




Issue Time Tracking
-------------------

    Worklog Id:     (was: 810362)
    Time Spent: 1h  (was: 50m)

> ExplicitPortForwardingTracker does not unbind auto-allocated one
> ----------------------------------------------------------------
>
>                 Key: SSHD-1293
>                 URL: https://issues.apache.org/jira/browse/SSHD-1293
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 2.8.0
>            Reporter: Jan Philipp
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> I have noticed that the de-allocation (unbind of a forwarding) initiated by 
> {{org.apache.sshd.client.session.forward.ExplicitPortForwardingTracker}} in 
> the {{close()}} method will not no close the actual forwarding. Said that, 
> this leaves the connection and a file handler open.
> The actual main reason is that it uses 
> \{{manager.stopLocalPortForwarding(this.getLocalAddress());}} which means it 
> stops the tunnel identified the "local address" which is the same as provided 
> by the user. If the user is using a local address with port {{0}} (which 
> seems legit since the docs state this explicitly), the local address will be 
> still something like {{0.0.0.0:0}} or maybe {{{}127.0.0.1:0{}}}, but only the 
> "bound address" contains the actual dynamic auto-allocated port.
> If the user uses an explicit port, this would work.
> As a workaround, I have added after {{tracker.close()}} an explicit 
> {{session.stopLocalPortForwarding(tracker.getBoundAddress())}}. I don't know 
> if this would your final solution or this would be an issue in 
> \{{DefaultForwarder#stopLocalPortForwarding}}.
>  
> I'm using 2.8 right now; as far as I can see there are no changes in 2.9 
> regarding this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to