[cups] Use IP_FREEBIND socket option when binding listening sockets (bug #970809).
Tim Waugh
twaugh at fedoraproject.org
Thu Jun 20 11:01:30 UTC 2013
commit f75ce252c6c7b14548bdf30d3fb525d095590cd1
Author: Tim Waugh <twaugh at redhat.com>
Date: Thu Jun 20 11:52:35 2013 +0100
Use IP_FREEBIND socket option when binding listening sockets (bug #970809).
Resolves: rhbz#970809
cups-freebind.patch | 14 ++++++++++++++
cups.spec | 8 +++++++-
2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/cups-freebind.patch b/cups-freebind.patch
new file mode 100644
index 0000000..7cd023d
--- /dev/null
+++ b/cups-freebind.patch
@@ -0,0 +1,14 @@
+diff -up cups-1.7b1/scheduler/listen.c.freebind cups-1.7b1/scheduler/listen.c
+--- cups-1.7b1/scheduler/listen.c.freebind 2013-06-20 11:48:17.427352639 +0100
++++ cups-1.7b1/scheduler/listen.c 2013-06-20 11:51:15.023288361 +0100
+@@ -198,6 +198,10 @@ cupsdStartListening(void)
+ setsockopt(lis->fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val));
+ #endif /* __sun */
+
++#ifdef __linux
++ setsockopt(lis->fd, IPPROTO_IP, IP_FREEBIND, &val, sizeof(val));
++#endif /* __linux */
++
+ /*
+ * Bind to the port we found...
+ */
diff --git a/cups.spec b/cups.spec
index b75de44..1313672 100644
--- a/cups.spec
+++ b/cups.spec
@@ -14,7 +14,7 @@ Summary: CUPS printing system
Name: cups
Epoch: 1
Version: 1.7
-Release: 0.6.%{prever}%{?dist}
+Release: 0.7.%{prever}%{?dist}
License: GPLv2
Group: System Environment/Daemons
Url: http://www.cups.org/
@@ -62,6 +62,7 @@ Patch28: cups-17b1-va_list.patch
Patch29: cups-enum-all.patch
Patch30: cups-stringpool-setprinterattr.patch
Patch31: cups-dymo-deviceid.patch
+Patch32: cups-freebind.patch
Patch100: cups-lspp.patch
@@ -239,6 +240,8 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
%patch30 -p1 -b .stringpool-setprinterattr
# Added IEEE 1284 Device ID for a Dymo device (bug #747866).
%patch31 -p1 -b .dymo-deviceid
+# Use IP_FREEBIND socket option when binding listening sockets (bug #970809).
+%patch32 -p1 -b .freebind
%if %lspp
# LSPP support.
@@ -640,6 +643,9 @@ rm -f %{cups_serverbin}/backend/smb
%{_mandir}/man5/ipptoolfile.5.gz
%changelog
+* Thu Jun 20 2013 Tim Waugh <twaugh at redhat.com> 1:1.7-0.7.b1
+- Use IP_FREEBIND socket option when binding listening sockets (bug #970809).
+
* Tue Jun 18 2013 Tim Waugh <twaugh at redhat.com> 1:1.7-0.6.b1
- Added IEEE 1284 Device ID for a Dymo device (bug #747866).
More information about the scm-commits
mailing list