rpms/bind/F-9 bind-9.5-any.patch,NONE,1.1 bind.spec,1.258,1.259

Adam Tkac (atkac) fedora-extras-commits at redhat.com
Tue May 6 09:45:21 UTC 2008


Author: atkac

Update of /cvs/pkgs/rpms/bind/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20051

Modified Files:
	bind.spec 
Added Files:
	bind-9.5-any.patch 
Log Message:
- addresses 0.0.0.0 and ::0 really match any (#275091, comment #28)


bind-9.5-any.patch:

--- NEW FILE bind-9.5-any.patch ---
diff -up bind-9.5.0b3/lib/isc/netaddr.c.any bind-9.5.0b3/lib/isc/netaddr.c
--- bind-9.5.0b3/lib/isc/netaddr.c.any	2008-05-05 22:01:29.000000000 +0200
+++ bind-9.5.0b3/lib/isc/netaddr.c	2008-05-05 22:24:52.000000000 +0200
@@ -69,10 +69,11 @@ isc_boolean_t
 isc_netaddr_eqprefix(const isc_netaddr_t *a, const isc_netaddr_t *b,
 		     unsigned int prefixlen)
 {
-	const unsigned char *pa, *pb;
+	const unsigned char *pa, *pb, *pany;
 	unsigned int ipabytes; /* Length of whole IP address in bytes */
 	unsigned int nbytes;   /* Number of significant whole bytes */
 	unsigned int nbits;    /* Number of significant leftover bits */
+	isc_netaddr_t any;     /* represents 0.0.0.0 or ::0 */
 
 	REQUIRE(a != NULL && b != NULL);
 
@@ -86,11 +87,15 @@ isc_netaddr_eqprefix(const isc_netaddr_t
 	case AF_INET:
 		pa = (const unsigned char *) &a->type.in;
 		pb = (const unsigned char *) &b->type.in;
+		isc_netaddr_any(&any);
+		pany = (const unsigned char *) &any.type.in;
 		ipabytes = 4;
 		break;
 	case AF_INET6:
 		pa = (const unsigned char *) &a->type.in6;
 		pb = (const unsigned char *) &b->type.in6;
+		isc_netaddr_any6(&any);
+		pany = (const unsigned char *) &any.type.in6;
 		ipabytes = 16;
 		break;
 	default:
@@ -99,6 +104,10 @@ isc_netaddr_eqprefix(const isc_netaddr_t
 		return (ISC_FALSE);
 	}
 
+	if (memcmp(pa, pany, ipabytes) == 0 ||
+	    memcmp(pb, pany, ipabytes) == 0)
+		return (ISC_TRUE);
+
 	/*
 	 * Don't crash if we get a pattern like 10.0.0.1/9999999.
 	 */


Index: bind.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bind/F-9/bind.spec,v
retrieving revision 1.258
retrieving revision 1.259
diff -u -r1.258 -r1.259
--- bind.spec	5 May 2008 09:46:24 -0000	1.258
+++ bind.spec	6 May 2008 09:44:46 -0000	1.259
@@ -18,7 +18,7 @@
 Name: 		bind
 License: 	ISC
 Version: 	9.5.0
-Release: 	30.%{RELEASEVER}%{?dist}
+Release: 	30.1.%{RELEASEVER}%{?dist}
 Epoch:   	32
 Url: 		http://www.isc.org/products/BIND/
 Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -59,6 +59,7 @@
 Patch87:	bind-9.5-parallel-build.patch
 Patch90:	bind-9.5-libcap.patch
 Patch91:	bind-9.5-recv-race.patch
+Patch92:	bind-9.5-any.patch
 
 # SDB patches
 Patch11: 	bind-9.3.2b2-sdbsrc.patch
@@ -238,6 +239,7 @@
 %patch85 -p1 -b .libidn3
 %patch87 -p1 -b .parallel
 %patch91 -p1 -b .recv-race
+%patch92 -p1 -b .any
 :;
 
 
@@ -643,6 +645,9 @@
 %{_sbindir}/bind-chroot-admin
 
 %changelog
+* Tue May 06 2008 Adam Tkac <atkac redhat com> 32:9.5.0-30.1.b3
+- addresses 0.0.0.0 and ::0 really match any (#275091, comment #28)
+
 * Mon May 05 2008 Adam Tkac <atkac redhat com> 32:9.5.0-30.b3
 - 9.5.0b3 release
 - dropped patches (upstream)




More information about the scm-commits mailing list