Bug 184840

Summary: krdc doesn't close TCP/IP connections when closing session
Product: [Applications] krdc Reporter: Stefan Becker <chemobejk>
Component: VNCAssignee: Urs Wolfer <uwolfer>
Status: RESOLVED UPSTREAM    
Severity: normal CC: amvandemore
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Stefan Becker 2009-02-18 20:30:41 UTC
Version:           KRDC: 4.2.00 (KDE 4.2.0) (using KDE 4.2.0)
OS:                Linux
Installed from:    Fedora RPMs

When you close a session in krdc the TCP/IP connection stays open. This is annoying when you're tunneling VNC connections through ssh, i.e. you are only able to exit ssh when you close krdc completely.

I have only tested VNC connections, so I don't know if this applies to RDP connections too. In my test I connected to a Xvnc running on the remote side.

Before starting krdc:

$ netstat -tnp | fgrep 5901
$

Starting krdc and setting up a connection to vnc://localhost:5901 which is tunneled through SSH to a remote host:

$ netstat -tnp | fgrep 5901
tcp        0      0 127.0.0.1:5901              127.0.0.1:50242             ESTABLISHED 3719/ssh
tcp        0      0 127.0.0.1:50242             127.0.0.1:5901              ESTABLISHED 3683/krdc

After closing the session, but krdc still running:

$ netstat -tnp | fgrep 5901
tcp        0      0 127.0.0.1:5901              127.0.0.1:50242             ESTABLISHED 3719/ssh
tcp     3470      0 127.0.0.1:50242             127.0.0.1:5901              ESTABLISHED 3683/krdc

After closing krdc:

$ netstat -tnp | fgrep 5901
$
Comment 1 Urs Wolfer 2009-05-16 12:57:02 UTC
I can reproduce this issue, but do not have any idea what could cause this issue. VncView objects get deleted when disconnecting from a remote server.
Comment 2 Stefan Becker 2009-05-20 22:24:54 UTC
This is a bug in LibVNCServer's libvncclient code: it doesn't close the client socket when the client data structure is destroyed. I've reported the problem to the project:

 <https://sourceforge.net/tracker/?func=detail&aid=2794565&group_id=32584&atid=405858>
Comment 3 Urs Wolfer 2009-05-21 09:45:39 UTC
Thanks Stefan for you investigation! Closing as upstream now.
Comment 4 Urs Wolfer 2011-01-30 20:06:17 UTC
*** Bug 264580 has been marked as a duplicate of this bug. ***