From 65248cc181b3237233fcacea737da34d470b9fca Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mar 24 2021 10:46:41 +0000 Subject: Revert patch that seems to cause problems with dns resolution --- diff --git a/0001-Revert-resolved-gracefully-handle-with-packets-with-.patch b/0001-Revert-resolved-gracefully-handle-with-packets-with-.patch new file mode 100644 index 0000000..2e93c5e --- /dev/null +++ b/0001-Revert-resolved-gracefully-handle-with-packets-with-.patch @@ -0,0 +1,55 @@ +From 9ac47d37a59142a66ac13f58bef197117ff53141 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Wed, 24 Mar 2021 11:42:39 +0100 +Subject: [PATCH] Revert "resolved: gracefully handle with packets with too + large RR count" + +This reverts commit 18674159ebbf622a9e6e5a45cc36b38f74dae315. + +There are multiple reports that this breaks lookups for people, and reverting +this commit, even on the main branch (approx. v248-rc4), fixes the issue. + +https://github.com/systemd/systemd/issues/18917#issuecomment-799421587 +https://bodhi.fedoraproject.org/updates/FEDORA-2021-1c1a870ceb +--- + src/resolve/resolved-dns-packet.c | 16 +--------------- + 1 file changed, 1 insertion(+), 15 deletions(-) + +diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c +index abc978ab83..15c8123f6a 100644 +--- a/src/resolve/resolved-dns-packet.c ++++ b/src/resolve/resolved-dns-packet.c +@@ -2271,18 +2271,6 @@ static int dns_packet_extract_answer(DnsPacket *p, DnsAnswer **ret_answer) { + bool cache_flush = false; + size_t start; + +- if (p->rindex == p->size) { +- /* If we reached the end of the packet already, but there are still more RRs +- * declared, then that's a corrupt packet. Let's accept the packet anyway, since it's +- * apparently a common bug in routers. Let's however suppress OPT support in this +- * case, so that we force the rest of the logic into lowest DNS baseline support. Or +- * to say this differently: if the DNS server doesn't even get the RR counts right, +- * it's highly unlikely it gets EDNS right. */ +- log_debug("More resource records declared in packet than included, suppressing OPT."); +- bad_opt = true; +- break; +- } +- + r = dns_packet_read_rr(p, &rr, &cache_flush, &start); + if (r < 0) + return r; +@@ -2382,10 +2370,8 @@ static int dns_packet_extract_answer(DnsPacket *p, DnsAnswer **ret_answer) { + previous = dns_resource_record_ref(rr); + } + +- if (bad_opt) { ++ if (bad_opt) + p->opt = dns_resource_record_unref(p->opt); +- p->opt_start = p->opt_size = SIZE_MAX; +- } + + *ret_answer = TAKE_PTR(answer); + +-- +2.30.2 + diff --git a/systemd.spec b/systemd.spec index 8e30310..6e10850 100644 --- a/systemd.spec +++ b/systemd.spec @@ -21,7 +21,7 @@ Name: systemd Url: https://www.freedesktop.org/wiki/Software/systemd Version: 248~rc4 -Release: 3%{?dist} +Release: 4%{?dist} # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: System and Service Manager @@ -89,6 +89,8 @@ Patch0004: https://github.com/systemd/systemd/commit/5cdb3f70ebe035323f4f07 Patch0005: https://github.com/systemd/systemd/commit/f9b3afae96c72564cd4cd766555845f17e3c12a9.patch Patch0006: https://github.com/systemd/systemd/commit/0e557eef37c9ebcc8f5c19fc6fc44b6fd617cc5d.patch +Patch0007: 0001-Revert-resolved-gracefully-handle-with-packets-with-.patch + # Downstream-only patches (5000–9999) # https://bugzilla.redhat.com/show_bug.cgi?id=1738828 Patch0500: use-bfq-scheduler.patch @@ -966,6 +968,10 @@ getent passwd systemd-network &>/dev/null || useradd -r -u 192 -l -g systemd-net %files standalone-sysusers -f .file-list-standalone-sysusers %changelog +* Wed Mar 24 2021 Zbigniew Jędrzejewski-Szmek - 248~rc4-4 +- Revert patch that seems to cause problems with dns resolution + (see comments on https://bodhi.fedoraproject.org/updates/FEDORA-2021-1c1a870ceb) + * Mon Mar 22 2021 Zbigniew Jędrzejewski-Szmek - 248~rc4-3 - Fix hang when processing timers during DST switch in Europe/Dublin timezone (#1941335) - Fix returning combined IPv4/IPv6 responses from systemd-resolved cache (#1940715)