[cups/f16] Handle "localhost" resolving to 127.0.0.1 on IPv6-addressed systems (bug #737230).

Tim Waugh twaugh at fedoraproject.org
Wed Oct 5 17:27:19 UTC 2011


commit 778fcc75ef9bd6588af4627f53ec6b72ab33e064
Author: Tim Waugh <twaugh at redhat.com>
Date:   Wed Oct 5 18:26:56 2011 +0100

    Handle "localhost" resolving to 127.0.0.1 on IPv6-addressed systems (bug #737230).

 cups-loopback.patch |   14 ++++++++++++++
 cups.spec           |   11 ++++++++++-
 2 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/cups-loopback.patch b/cups-loopback.patch
new file mode 100644
index 0000000..010c709
--- /dev/null
+++ b/cups-loopback.patch
@@ -0,0 +1,14 @@
+diff -up cups-1.5.0/cups/http-addr.c.loopback cups-1.5.0/cups/http-addr.c
+--- cups-1.5.0/cups/http-addr.c.loopback	2011-10-05 17:48:36.469794399 +0100
++++ cups-1.5.0/cups/http-addr.c	2011-10-05 17:48:52.293500663 +0100
+@@ -147,7 +147,9 @@ httpAddrLocalhost(
+ 
+ #ifdef AF_INET6
+   if (addr->addr.sa_family == AF_INET6 &&
+-      IN6_IS_ADDR_LOOPBACK(&(addr->ipv6.sin6_addr)))
++      (IN6_IS_ADDR_LOOPBACK(&(addr->ipv6.sin6_addr)) ||
++       (IN6_IS_ADDR_V4COMPAT(&(addr->ipv6.sin6_addr)) &&
++	addr->ipv6.sin6_addr.s6_addr[12] == 0x7f)))
+     return (1);
+ #endif /* AF_INET6 */
+ 
diff --git a/cups.spec b/cups.spec
index b70f196..5457f38 100644
--- a/cups.spec
+++ b/cups.spec
@@ -13,7 +13,7 @@
 Summary: Common Unix Printing System
 Name: cups
 Version: 1.5.0
-Release: 13%{?dist}
+Release: 14%{?dist}
 License: GPLv2
 Group: System Environment/Daemons
 Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
@@ -73,6 +73,7 @@ Patch35: cups-icc.patch
 Patch36: cups-systemd-socket.patch
 Patch37: cups-CVE-2011-2896.patch
 Patch38: cups-driverd-bug.patch
+Patch39: cups-loopback.patch
 
 Patch100: cups-lspp.patch
 
@@ -300,6 +301,10 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
 # Work around PPDs cache handling issue (bug #742989).
 %patch38 -p1 -b .driverd-bug
 
+# Handle "localhost" resolving to 127.0.0.1 on IPv6-addressed systems
+# (bug #737230).
+%patch39 -p1 -b .loopback
+
 %if %lspp
 # LSPP support.
 %patch100 -p1 -b .lspp
@@ -646,6 +651,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/ipptool.1.gz
 
 %changelog
+* Wed Oct  5 2011 Tim Waugh <twaugh at redhat.com> 1:1.5.0-14
+- Handle "localhost" resolving to 127.0.0.1 on IPv6-addressed systems
+  (bug #737230).
+
 * Tue Oct  4 2011 Tim Waugh <twaugh at redhat.com> 1:1.5.0-13
 - Work around PPDs cache handling issue (bug #742989).
 


More information about the scm-commits mailing list