- Added patch for ldns-read-zone that does not put @. in RRDATA
This commit is contained in:
parent
424657c10d
commit
8fe9e9c463
@ -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 @@ The devel package contains the ldns library and the include files
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch0
|
||||
# To built svn snapshots
|
||||
#rm config.guess config.sub ltmain.sh
|
||||
#libtoolize
|
||||
@ -83,6 +84,9 @@ rm -rf %{buildroot}
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Fri Nov 9 2007 Paul Wouters <paul@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@xelerance.com> - 1.2.1-2
|
||||
- Use install -p to work around multilib conflicts for .h files
|
||||
|
||||
|
||||
56
ldns_1.2.1_origin.patch
Normal file
56
ldns_1.2.1_origin.patch
Normal file
@ -0,0 +1,56 @@
|
||||
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;
|
||||
Loading…
Reference in New Issue
Block a user