Bug 3024

Summary: Socket not removed after closing the session
Product: Portable OpenSSH Reporter: bugzilla
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: NEW ---    
Severity: enhancement    
Priority: P5    
Version: 7.9p1   
Hardware: Other   
OS: Linux   
See Also: https://bugzilla.redhat.com/show_bug.cgi?id=1711655

Description bugzilla 2019-06-27 02:34:47 AEST
Description of problem:
When using the socked forward via -L then after closing the session the socket created on the locale side are not removed.

Version-Release number of selected component (if applicable):
openssh-clients-7.9p1-5.fc29.x86_64


How reproducible:
Every time


Steps to Reproduce:
1. ssh foo -L /tmp/foo:/var/lib/mysql/mysql.sock
2. close the connection
3. ssh foo -L /tmp/foo:/var/lib/mysql/mysql.sock

Actual results:
The 3rd call will fail with:
unix_listener: cannot bind to path /tmp/foo: Address already in use
Could not request local forwarding.

Expected results:
Working forward.

Additional info:
ssh foo -L /tmp/foo:/var/lib/mysql/mysql.sock
rm /tmp/foo
ssh foo -L /tmp/foo:/var/lib/mysql/mysql.sock
Will work, so nothing will use the socket.

See the Red Hat Bugzilla for the whole communication.