From 9128ab942e969a290ed66ff25b04701403e12427 Mon Sep 17 00:00:00 2001 From: Mike Beaumont Date: Mon, 22 Jul 2024 19:01:31 +0200 Subject: [PATCH] fix: build v1.31 (#105) Signed-off-by: Mike Beaumont --- ...01-dns-don-t-error-if-header-id-is-0.patch | 27 +++++++++++++++++++ scripts/fetch_sources.sh | 1 + 2 files changed, 28 insertions(+) create mode 100644 patches/v1.31-0001-dns-don-t-error-if-header-id-is-0.patch diff --git a/patches/v1.31-0001-dns-don-t-error-if-header-id-is-0.patch b/patches/v1.31-0001-dns-don-t-error-if-header-id-is-0.patch new file mode 100644 index 0000000..beb9943 --- /dev/null +++ b/patches/v1.31-0001-dns-don-t-error-if-header-id-is-0.patch @@ -0,0 +1,27 @@ +From db432303b88ef5197ad6ed330a15173bf7967e1d Mon Sep 17 00:00:00 2001 +From: Mike Beaumont +Date: Tue, 9 Jul 2024 10:14:29 +0200 +Subject: [PATCH] dns: don't error if header id is 0 + +--- + source/extensions/filters/udp/dns_filter/dns_parser.cc | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/source/extensions/filters/udp/dns_filter/dns_parser.cc b/source/extensions/filters/udp/dns_filter/dns_parser.cc +index b63f69278d..9be5917d9b 100644 +--- a/source/extensions/filters/udp/dns_filter/dns_parser.cc ++++ b/source/extensions/filters/udp/dns_filter/dns_parser.cc +@@ -212,10 +212,6 @@ bool DnsMessageParser::parseDnsObject(DnsQueryContextPtr& context, + } + + context->id_ = static_cast(context->header_.id); +- if (context->id_ == 0) { +- ENVOY_LOG(debug, "No ID in DNS query"); +- return false; +- } + + // Almost always, we will have only one query here. Per the RFC, QDCOUNT is usually 1 + context->queries_.reserve(context->header_.questions); +-- +2.45.2 + diff --git a/scripts/fetch_sources.sh b/scripts/fetch_sources.sh index a3b7c34..06b0b4b 100755 --- a/scripts/fetch_sources.sh +++ b/scripts/fetch_sources.sh @@ -15,6 +15,7 @@ patches_per_version[v1.27]="$(realpath "patches/v1.27-0001-dns-don-t-error-if-he patches_per_version[v1.28]="$(realpath "patches/v1.28-0001-dns-don-t-error-if-header-id-is-0.patch")" patches_per_version[v1.29]="$(realpath "patches/v1.29-0001-dns-don-t-error-if-header-id-is-0.patch")" patches_per_version[v1.30]="$(realpath "patches/v1.30-0001-dns-don-t-error-if-header-id-is-0.patch")" +patches_per_version[v1.31]="$(realpath "patches/v1.31-0001-dns-don-t-error-if-header-id-is-0.patch")" PATCH_FILES_1_26=( "$(realpath "scripts/dns_filter_resolver.h.patch")"