diff options
author | Laurent Bigonville <bigon@bigon.be> | 2013-12-26 17:28:28 +0100 |
---|---|---|
committer | Laurent Bigonville <bigon@bigon.be> | 2013-12-26 18:02:08 +0100 |
commit | 6cd6720c55d1adfc3ed863e7bc21a2f1311ecf5b (patch) | |
tree | 255fc1a760e7fcb16097c926747e5b07886a8244 | |
parent | ba22062fa18425f2db3524832697831c8cb13bd2 (diff) | |
download | avahi-6cd6720c55d1adfc3ed863e7bc21a2f1311ecf5b.tar.gz |
Use patch from Ubuntu to fix #732009 instead
This patch actually check errno and makes avahi-daemon exit in the
appropriate cases.
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/patches/reuseport-nonfatal.patch | 18 | ||||
-rw-r--r-- | debian/patches/series | 2 | ||||
-rw-r--r-- | debian/patches/so_reuseport-may-not-exist-in-running-kernel.patch | 28 |
4 files changed, 32 insertions, 21 deletions
diff --git a/debian/changelog b/debian/changelog index e200f1f..337fdff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,8 @@ avahi (0.6.31-4) UNRELEASED; urgency=medium - * debian/patches/reuseport-nonfatal.patch: Do not exit avahi-daemon if we - cannot set SO_REUSEPORT to the socket. (Closes: #732009) + * d/p/so_reuseport-may-not-exist-in-running-kernel.patch: Do not exit + avahi-daemon if we cannot set SO_REUSEPORT on the socket. This patch has + be taken from Ubuntu, thanks to them (Closes: #732009) -- Laurent Bigonville <bigon@debian.org> Thu, 19 Dec 2013 19:18:20 +0100 diff --git a/debian/patches/reuseport-nonfatal.patch b/debian/patches/reuseport-nonfatal.patch deleted file mode 100644 index 21adfcb..0000000 --- a/debian/patches/reuseport-nonfatal.patch +++ /dev/null @@ -1,18 +0,0 @@ -Description: Do not exit avahi-daemon if we cannot set SO_REUSEPORT to the socket. - This is only supported with kernel version >= 3.9 - . - This patch could be removed after jessie release. -Author: Laurent Bigonville <bigon@debian.org> -Forwarded: not-needed - ---- a/avahi-core/socket.c -+++ b/avahi-core/socket.c -@@ -177,7 +177,7 @@ static int reuseaddr(int fd) { - yes = 1; - if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) < 0) { - avahi_log_warn("SO_REUSEPORT failed: %s", strerror(errno)); -- return -1; -+ /*return -1; */ - } - #endif - diff --git a/debian/patches/series b/debian/patches/series index be857df..89c6630 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,4 @@ # Debian patches for Avahi 01_avahi-daemon.conf.patch +so_reuseport-may-not-exist-in-running-kernel.patch no-deprecations.patch -reuseport-nonfatal.patch diff --git a/debian/patches/so_reuseport-may-not-exist-in-running-kernel.patch b/debian/patches/so_reuseport-may-not-exist-in-running-kernel.patch new file mode 100644 index 0000000..3f7fdcf --- /dev/null +++ b/debian/patches/so_reuseport-may-not-exist-in-running-kernel.patch @@ -0,0 +1,28 @@ +Description: SO_REUSEPORT may not exist in running kernel + When userspace defines SO_REUSEPORT we will attempt to enable socket + port number reuse. However if the running kernel does not support + this call it will fail preventing daemon startup. If this call is + present but fails ENOPROTOOPT then we know that actually the kernel + does not support it and we should continue as if we did not have the + call at all. (LP: #1228204) + . + This patch could be removed from the debian package after jessie release. +Author: Andy Whitcroft <apw@canonical.com> +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1228204 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732009 +Last-Update: 2013-09-20 + +Index: avahi-0.6.31/avahi-core/socket.c +=================================================================== +--- avahi-0.6.31.orig/avahi-core/socket.c 2013-09-20 16:36:50.000000000 +0100 ++++ avahi-0.6.31/avahi-core/socket.c 2013-09-20 16:38:23.781863644 +0100 +@@ -177,7 +177,8 @@ + yes = 1; + if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) < 0) { + avahi_log_warn("SO_REUSEPORT failed: %s", strerror(errno)); +- return -1; ++ if (errno != ENOPROTOOPT) ++ return -1; + } + #endif + |