Your message dated Sun, 09 Oct 2011 12:20:25 +0000
with message-id <e1rcsmj-00015x...@franck.debian.org>
and subject line Bug#644511: fixed in minissdpd 1.1.20111007-1
has caused the Debian Bug report #644511,
regarding minissdpd will not coexist with other SSDP apps
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
644511: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=644511
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: minissdpd
Version: 1.0-2
Severity: critical
Tags: patch

Hi,

Minissdpd will not coexist with other apps that wish to listen to SSDP
multicast traffic.
- minissdpd will refuse to start if another SSDP app is running (i.e.
  already using the UDP port)
- when  minissdpd is running, other apps, which normally start fine and
  peacefully coexist with each other, fail to start.
  (e.g. upnp-router-control and gssdp-device-sniffer)

debian:root ~ 113 # ps ax | grep minissdpd
17975 ?        Ss     0:00 minissdpd -i 0.0.0.0
17990 pts/4    S+     0:00 grep minissdpd
debian:root ~ 114 # upnp-router-control
* Initializing GUI...
* Showing GUI...
* Starting UPnP Resource discovery... 
** ERROR **: \u001b[31m[EE]\u001b[0m gupnp_context_new: Failed to bind 
socketError binding to address: Address already in use (33)
aborting...
Aborted
debian:root ~ 115 # gssdp-device-sniffer 
Error creating the GSSDP client: Failed to bind socketError binding to address: 
Address already in use
debian:root ~ 116 # 

---------

debian:root ~ 234 # upnp-router-control &
[2] 21274
debian:root ~ 235 # * Initializing GUI...
* Showing GUI...
* Starting UPnP Resource discovery... done

debian:root ~ 235 # gssdp-device-sniffer &
[3] 21276
debian:root ~ 236 # minissdpd -d -i 0.0.0.0
minissdpd[21277]: bind(udp): Address already in use
minissdpd[21277]: Cannot open socket for receiving SSDP messages, exiting
debian:root ~ 237 # 


The problem is that minissdpd does not set the SO_REUSEADDR option on the
UDP socket. Other apps (e.g. upnp-router-control and gssdp-device-sniffer) do
set SO_REUSEADDR.

I have attached a patch to fix this.

I hereby allow this patch to be included in, and redistributed with, minidsspd
or any derived software using the same license that minissdpd 1.0-2 (as found
in debian on oct 6, 2011) uses.
If this is not sufficient, please ask, and I'll reformulate to something 
acceptable.

Regards,

Rogier.

Patch:
----------------------------
diff -aur minissdpd-1.0/openssdpsocket.c 
minissdpd-1.0-patch-sharesock/openssdpsocket.c
--- minissdpd-1.0/openssdpsocket.c      2008-10-04 12:53:03.000000000 +0200
+++ minissdpd-1.0-patch-sharesock/openssdpsocket.c      2011-10-06 
13:59:40.000000000 +0200
@@ -42,6 +42,8 @@
                                                         const char * * 
listen_addr)
 {
        int s;
+       int rv;
+       int opt;
        struct sockaddr_in sockname;
        
        if( (s = socket(PF_INET, SOCK_DGRAM, 0)) < 0)
@@ -58,6 +60,15 @@
     sockname.sin_addr.s_addr = htonl(INADDR_ANY);
     /*sockname.sin_addr.s_addr = inet_addr(ifaddr);*/
 
+       opt = 1;
+       rv = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
+       if (rv < 0)
+       {
+               syslog(LOG_ERR, "setsockopt(SO_REUSEADDR): %m");
+               close(s);
+               return -1;
+       }
+
     if(bind(s, (struct sockaddr *)&sockname, sizeof(struct sockaddr_in)) < 0)
        {
                syslog(LOG_ERR, "bind(udp): %m");
----------------------------


-- System Information:
Debian Release: wheezy/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'testing')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages minissdpd depends on:
ii  libc6                         2.13-10    Embedded GNU C Library: Shared lib

minissdpd recommends no packages.

minissdpd suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: minissdpd
Source-Version: 1.1.20111007-1

We believe that the bug you reported is fixed in the latest version of
minissdpd, which is due to be installed in the Debian FTP archive:

minissdpd_1.1.20111007-1.diff.gz
  to main/m/minissdpd/minissdpd_1.1.20111007-1.diff.gz
minissdpd_1.1.20111007-1.dsc
  to main/m/minissdpd/minissdpd_1.1.20111007-1.dsc
minissdpd_1.1.20111007-1_amd64.deb
  to main/m/minissdpd/minissdpd_1.1.20111007-1_amd64.deb
minissdpd_1.1.20111007.orig.tar.gz
  to main/m/minissdpd/minissdpd_1.1.20111007.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 644...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Thomas Goirand <z...@debian.org> (supplier of updated minissdpd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Format: 1.8
Date: Sun, 09 Oct 2011 17:49:12 +0000
Source: minissdpd
Binary: minissdpd
Architecture: source amd64
Version: 1.1.20111007-1
Distribution: unstable
Urgency: low
Maintainer: Thomas Goirand <z...@debian.org>
Changed-By: Thomas Goirand <z...@debian.org>
Description: 
 minissdpd  - keep memory of all UPnP devices that announced themselves
Closes: 630665 635911 644508 644509 644510 644511
Changes: 
 minissdpd (1.1.20111007-1) unstable; urgency=low
 .
   * New upstream version including the bugfixes to bugs sent to the Debian
   BTS (Closes: #644508, #644509, #644510, #644511, #630665).
   * Added a patch to disable calls to link_ntoa in Debian/kFreeBSD
   (Closes: #635911).
   * debian/copyright is now in DEP5 format.
Checksums-Sha1: 
 919be2fb5f6f9c63c471d17b28bae8c18d0213f5 1217 minissdpd_1.1.20111007-1.dsc
 b2f82ed89f682d626556c7bebd8552d2ce5384c2 17611 
minissdpd_1.1.20111007.orig.tar.gz
 d49c41d6593eb9ab5896cdd93dc7f0c52320d2ce 3919 minissdpd_1.1.20111007-1.diff.gz
 d4be7dfa4d67203b7f2b3c9b392fbc6bcca9c740 16818 
minissdpd_1.1.20111007-1_amd64.deb
Checksums-Sha256: 
 3bc173b8436b807f68fa032b30c9a525f614cd3bdc8b583dc8aa84496530209d 1217 
minissdpd_1.1.20111007-1.dsc
 95e8493a02bd45b6481b892a7d0d8f21c44b10ed5fbe67108d5c3f5471a165d5 17611 
minissdpd_1.1.20111007.orig.tar.gz
 7f893f16dddcaaec996ba75439e9d60e79b13e305ebf27655c9a2951c3f7ee7f 3919 
minissdpd_1.1.20111007-1.diff.gz
 1d4b414dc041a74424df99a2699f296f4648f923cf3dbb47b6b5c5989d238639 16818 
minissdpd_1.1.20111007-1_amd64.deb
Files: 
 7bb1a961a01c8225dc528384b45dd9a1 1217 net optional minissdpd_1.1.20111007-1.dsc
 11ba5252e9713c5465444b9cf36a40ed 17611 net optional 
minissdpd_1.1.20111007.orig.tar.gz
 5ae835f83edd7c6a7a38da5247aa49ee 3919 net optional 
minissdpd_1.1.20111007-1.diff.gz
 1ed908dc1ea7cabbc6c94dccd7bc16c4 16818 net optional 
minissdpd_1.1.20111007-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEAREDAAYFAk6R7HMACgkQl4M9yZjvmkkIAgCfQX6zvBEGViIGlaSJvXz+WfjB
sCgAoM2c2jaGffNmoSNO72Cm5/sjK0PD
=Psuf
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to