rpms/ldns/devel ldns_1.2.1_origin.patch, NONE, 1.1 ldns.spec, 1.25, 1.26

Paul Wouters (pwouters) fedora-extras-commits at redhat.com
Fri Nov 9 16:57:43 UTC 2007


Author: pwouters

Update of /cvs/extras/rpms/ldns/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14627

Modified Files:
	ldns.spec 
Added Files:
	ldns_1.2.1_origin.patch 
Log Message:
* Fri Nov  9 2007 Paul Wouters <paul at xelerance.com> - 1.2.1-3
- Added patch for ldns-read-zone that does not put @. in RRDATA


ldns_1.2.1_origin.patch:

--- NEW FILE ldns_1.2.1_origin.patch ---
Index: zone.c
===================================================================
--- zone.c	(revision 2480)
+++ zone.c	(revision 2482)
@@ -181,7 +181,8 @@
 		/* also set the prev */
 		my_prev   = ldns_rdf_clone(origin);
 	} else {
-		my_origin = ldns_dname_new_frm_str(".");
+		my_origin = NULL;
+		/*my_origin = ldns_dname_new_frm_str(".");*/
 		my_prev = NULL;
 	}
 
@@ -198,6 +199,10 @@
 				}
 				soa_seen = true;
 				ldns_zone_set_soa(newzone, rr);
+				/* set origin to soa if not specified */
+				if (!my_origin) {
+					my_origin = ldns_rdf_clone(ldns_rr_owner(rr));
+				}
 				continue;
 			}
 			
Index: rr.c
===================================================================
--- rr.c	(revision 2480)
+++ rr.c	(revision 2482)
@@ -417,11 +417,22 @@
 									ldns_rr_descriptor_field_type(desc, r_cnt),
 									rd);
 
-							/* check if the origin should be concatenated */
-							if (rd_strlen > 1 && !ldns_dname_str_absolute(rd) && origin) {
+							/* check if the origin should be used or concatenated */
+							if (rd_strlen == 1 && ldns_rdf_data(r)[1] == '@') {
+								ldns_rdf_deep_free(r);
+								if (origin) {
+									r = ldns_rdf_clone(origin);
+								} else {
+								     /* if this is the SOA, use its own owner name */
+									if (rr_type == LDNS_RR_TYPE_SOA) {
+										r = ldns_rdf_clone(ldns_rr_owner(new));
+									} else {
+										r = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_DNAME, ".");
+									}
+								}
+							} else if (rd_strlen > 1 && !ldns_dname_str_absolute(rd) && origin) {
 								if (!ldns_dname_cat(r, origin)) {
-									/* don't change this (yet MIEK */
-									/* return LDNS_STATUS_SYNTAX_ERR; */
+									return LDNS_STATUS_ERR;
 								}
 							}
 							break;


Index: ldns.spec
===================================================================
RCS file: /cvs/extras/rpms/ldns/devel/ldns.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- ldns.spec	19 Oct 2007 22:34:27 -0000	1.25
+++ ldns.spec	9 Nov 2007 16:57:08 -0000	1.26
@@ -1,11 +1,12 @@
 Summary: Lowlevel DNS(SEC) library with API
 Name: ldns
 Version: 1.2.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: BSD
 Url: http://open.nlnetlabs.nl/%{name}/
 Source: http://open.nlnetlabs.nl/downloads/%{name}-%{version}.tar.gz
 Group: System Environment/Libraries
+Patch0: ldns_1.2.1_origin.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: libtool, autoconf, automake, gcc-c++, openssl-devel, doxygen, perl libpcap-devel
 
@@ -25,7 +26,7 @@
 
 %prep
 %setup -q 
-
+%patch0 
 # To built svn snapshots
 #rm config.guess config.sub ltmain.sh
 #libtoolize
@@ -83,6 +84,9 @@
 %postun -p /sbin/ldconfig
 
 %changelog
+* Fri Nov  9 2007 Paul Wouters <paul at xelerance.com> - 1.2.1-3
+- Added patch for ldns-read-zone that does not put @. in RRDATA
+
 * Fri Oct 19 2007 Paul Wouters <paul at xelerance.com> - 1.2.1-2
 - Use install -p to work around multilib conflicts for .h files
 




More information about the fedora-extras-commits mailing list