Bug 179570

Summary: upnp plugin wrong ssdp behaviour with mediatomb
Product: [Applications] ktorrent Reporter: Emre <erenoglu>
Component: generalAssignee: Joris Guisson <joris.guisson>
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Emre 2009-01-04 05:22:11 UTC
Version:           3.1.4 (using Devel)
OS:                Linux
Installed from:    Compiled sources


I'm having a strange upnp behaviour ktorrent (kde4) when it's used with an a/v upnp media server, in this specific case, mediatomb.

I have:
- KDE4 4.1.85 (4.2 Beta2), Ktorrent 3.1.5
- KDE3 3.5.10, Ktorrent 2.2.7
- Portable UPnP library, pupnp 1.6.6
- aMule 2.2.3 (latest stable) compiled with pupnp 1.6.6
- mediatomb 0.11.0 compiled with pupnp 1.6.6


A) When ktorrent of KDE4 is already running and has captured udp port 1900, and if I start  mediatomb afterwards, mediatomb fails to run.

This behaviour does not occur if I run the ktorrent of KDE3 with upnp plugin. So the bug is definetely in the implementation of upnp in KDE4 ktorrent.

B) When amule is already running and has captured udp port 1900 (ssdp), and if I start mediatomb afterwards, no problems.

C) When mediatomb is already running and has captured udp port 1900, and if I start ktorrent or aMule, all run perfectly OK.

My guess is that ktorrent is capturing UDP port 1900 (SSDP) exclusively that Mediatomb can't bind to it afterwards, to serve as an A/V UPnP Media Server on the lan.

If mediatomb is started before ktorrent, then I can see these lines in netstat output:

udp        0      0  *                           18781/mediatomb
udp        0      0  *                           18880/ktorrent

However, if ktorrent (kde4) is started earlier, than mediatomb refuses to run.


Emre (Pardus 2008)
Comment 1 Joris Guisson 2009-01-04 20:02:20 UTC
SVN commit 905639 by guisson:

 Make sure UPnP does not take exclusive control of UDP port 1900 

BUG: 179570

 M  +1 -0      ChangeLog  
 M  +1 -1      libktupnp/upnpmcastsocket.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=905639