commit pdnsd for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pdnsd for openSUSE:Factory checked in at 2021-07-31 18:51:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pdnsd (Old) and /work/SRC/openSUSE:Factory/.pdnsd.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "pdnsd" Sat Jul 31 18:51:30 2021 rev:7 rq:909509 version:1.2.9a Changes: -------- --- /work/SRC/openSUSE:Factory/pdnsd/pdnsd.changes 2019-06-01 09:47:40.787361567 +0200 +++ /work/SRC/openSUSE:Factory/.pdnsd.new.1899/pdnsd.changes 2021-07-31 18:52:30.854449841 +0200 @@ -1,0 +2,9 @@ +Thu Jul 29 06:07:57 UTC 2021 - Stefan Seyfried <seife+obs@b1-systems.com> + +- add pdnsd-net_if_h-vs-linux_if_h.patch to fix Factory build +- add a locally tested collection of patches: + * pdnsd-06_reproducible_build.patch for reproducible build + * pdnsd-fix-udppacketsize.diff fixing an invalid UDP response + packet truncation encountered in the wild + +------------------------------------------------------------------- New: ---- pdnsd-06_reproducible_build.patch pdnsd-fix-udppacketsize.diff pdnsd-net_if_h-vs-linux_if_h.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pdnsd.spec ++++++ --- /var/tmp/diff_new_pack.5CtBQb/_old 2021-07-31 18:52:31.258449358 +0200 +++ /var/tmp/diff_new_pack.5CtBQb/_new 2021-07-31 18:52:31.262449353 +0200 @@ -1,7 +1,7 @@ # # spec file for package pdnsd # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,10 +22,16 @@ Summary: A caching DNS proxy for small networks or dialin accounts License: GPL-3.0-or-later Group: Productivity/Networking/DNS/Servers -Url: http://members.home.nl/p.a.rombouts/pdnsd.html +URL: http://members.home.nl/p.a.rombouts/pdnsd.html Source0: http://members.home.nl/p.a.rombouts/pdnsd/releases/pdnsd-%{version}-par.tar.gz Source1: pdnsd.service +# PATCH-FIX-OPENSUSE -- fix UDP response packet for large responses being incorrectly truncated -- seife@novell.slipkontur.de +Patch1: pdnsd-fix-udppacketsize.diff +# borrowed from debian's 1.2.9a-par-3 release +Patch2: pdnsd-06_reproducible_build.patch +# PATCH-FIX-OPENSUSE -- compile fix with newer glibc(?)/kernel-headers(?) where ordering matters -- seife+obs@b1-systems.com +Patch3: pdnsd-net_if_h-vs-linux_if_h.patch Recommends: %{name}-doc BuildRequires: systemd-rpm-macros BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -54,6 +60,7 @@ %prep %setup -q +%autopatch -p1 %build %configure --with-cachedir="%{_localstatedir}/cache/%{name}" \ ++++++ pdnsd-06_reproducible_build.patch ++++++ Author: Reiner Herrmann <reiner@reiner-h.de> Description: enable reproducible building - force UTF-8 locale while converting html to text - use SOURCE_DATE_EPOCH for timestamp in manpage --- a/doc/txt/doc_makefile +++ b/doc/txt/doc_makefile @@ -9,13 +9,13 @@ .PHONY: doc clean intro.txt: ../html/index.html - sed -e 's/<!--\(nodoc\|notext\)(-->/<!--/g' -e 's/<!--)\(nodoc\|notext\)-->/-->/g' ../html/index.html | $(HTML2TXT) | sed -e 's/[[:blank:]]+$$//' > intro.txt + sed -e 's/<!--\(nodoc\|notext\)(-->/<!--/g' -e 's/<!--)\(nodoc\|notext\)-->/-->/g' ../html/index.html | LC_ALL=C.UTF-8 $(HTML2TXT) | sed -e 's/[[:blank:]]+$$//' > intro.txt manual.txt: ../html/doc.html - sed -e 's/<!--\(nodoc\|notext\)(-->/<!--/g' -e 's/<!--)\(nodoc\|notext\)-->/-->/g' ../html/doc.html | $(HTML2TXT) | sed -e 's/[[:blank:]]+$$//' > manual.txt + sed -e 's/<!--\(nodoc\|notext\)(-->/<!--/g' -e 's/<!--)\(nodoc\|notext\)-->/-->/g' ../html/doc.html | LC_ALL=C.UTF-8 $(HTML2TXT) | sed -e 's/[[:blank:]]+$$//' > manual.txt faq.txt: ../html/faq.html - sed -e 's/<!--\(nodoc\|notext\)(-->/<!--/g' -e 's/<!--)\(nodoc\|notext\)-->/-->/g' ../html/faq.html | $(HTML2TXT) | sed -e 's/[[:blank:]]+$$//' > faq.txt + sed -e 's/<!--\(nodoc\|notext\)(-->/<!--/g' -e 's/<!--)\(nodoc\|notext\)-->/-->/g' ../html/faq.html | LC_ALL=C.UTF-8 $(HTML2TXT) | sed -e 's/[[:blank:]]+$$//' > faq.txt clean: @rm -fv intro.txt manual.txt faq.txt --- a/doc/html2confman.pl +++ b/doc/html2confman.pl @@ -50,7 +50,7 @@ ENDOFHEADER -print ".TH PDNSD.CONF 5 "",strftime("%b %Y",localtime),"" "pdnsd @fullversion@"\n"; +print ".TH PDNSD.CONF 5 "",strftime("%b %Y",gmtime($ENV{SOURCE_DATE_EPOCH} || time)),"" "pdnsd @fullversion@"\n"; print <<ENDOFHEADER2; .SH NAME pdnsd.conf \- The configuration file for pdnsd --- a/doc/doc_makefile +++ b/doc/doc_makefile @@ -27,7 +27,7 @@ } pdnsd.conf.5.in: html/doc.html html2confman.pl - perl html2confman.pl $< > $@ + LC_ALL=C.UTF-8 perl html2confman.pl $< > $@ html txt: @cd $@ && $(MAKE) -f doc_makefile ++++++ pdnsd-fix-udppacketsize.diff ++++++ From: Stefan Seyfried <stefan.seyfried@sap.com> Subject: fix invalid UDP packet in case of truncation The UDP response packet pdnsd sends is invalid in case of a truncated packet: The header fields ANCOUNT and NSCOUNT stil contains the "intended" number of records, but the payload is actually truncated to udpmaxrespsize. This might have worked if only additionals would overflow the packet size, but fails definitely when regular records already exceed it. Fix by always checking for space in the packet before actually adding any record, be it regular or additional. Index: b/src/dns_answer.c =================================================================== --- a/src/dns_answer.c +++ b/src/dns_answer.c @@ -392,10 +392,12 @@ static int add_rr(dns_msg_t **ans, size_ rdlen=dlen; *sz+=dlen; } - - if (udp && *sz>*udp && section==S_ADDITIONAL) /* only add the record if we do not increase the length over 512 */ - *sz=osz; /* (or possibly more if the request used EDNS) in additionals for udp answer. */ - else { + /* not only S_ADDITIONAL, skip everything if it does not fit into the response, sz+10 because we add 10 bytes below */ + if (udp && *sz+10>*udp /*&& section==S_ADDITIONAL*/) { + /* only add the record if we do not increase the length over 512 */ + *sz=osz; /* (or possibly more if the request used EDNS) in additionals for udp answer. */ + *udp=0; /* this signals that the response is too big for the udp packet */ + } else { PUTINT16(type,rrht); PUTINT16(C_IN,rrht); PUTINT32(ttl,rrht); @@ -1419,7 +1421,9 @@ static void *udp_answer_thread(void *dat } pthread_cleanup_push(free, resp); if (rlen>udpmaxrespsize) { - rlen=udpmaxrespsize; + /* udpmaxrespsize == 0 is the flag for "we did not have enough space for the response */ + if (udpmaxrespsize) + rlen=udpmaxrespsize; resp->hdr.tc=1; /*set truncated bit*/ } DEBUG_MSG("Outbound msg len %li, tc=%u, rc="%s"\n",(long)rlen,resp->hdr.tc,get_ename(rcode)); ++++++ pdnsd-net_if_h-vs-linux_if_h.patch ++++++ Subject: fix net/if.h vs linux/if.h include order conflicts From: Stefan Seyfried <seife+obs@b1-systems.com> Suddenly, probably after glibc or kernel-headers update, the build fails with this error (and following are more similar errors) | In file included from /usr/include/linux/icmp.h:24, | from icmp.c:44: | /usr/include/net/if.h:44:5: error: redeclaration of enumerator 'IFF_UP' | 44 | IFF_UP = 0x1, /* Interface is up. */ | | ^~~~~~ | /usr/include/linux/if.h:83:9: note: previous definition of 'IFF_UP' with type 'enum net_device_flags' | 83 | IFF_UP = 1<<0, /* sysfs */ | | ^~~~~~ this is caused by something down the include chaing including first linux/if.h and something else including net/if.h later. net/if.h breaks if it is included after linux/if.h. linux/if.h has provisions for net/if.h being included first. So the fix is to include net/if.h explicitly before the others, to work around the issue and fix the build. Index: b/src/icmp.c =================================================================== --- a/src/icmp.c +++ b/src/icmp.c @@ -39,6 +39,7 @@ #include <string.h> #include "ipvers.h" #if (TARGET==TARGET_LINUX) +# include <net/if.h> # include <netinet/ip.h> # include <linux/types.h> # include <linux/icmp.h>
participants (1)
-
Source-Sync