summaryrefslogtreecommitdiffstats
path: root/modules/workarounds
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 20:37:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 20:37:50 +0000
commitc1f743ab2e4a7046d5500875a47d1f62c8624603 (patch)
tree709946d52f5f3bbaeb38be9e3f1d56d11f058237 /modules/workarounds
parentInitial commit. (diff)
downloadknot-resolver-c1f743ab2e4a7046d5500875a47d1f62c8624603.tar.xz
knot-resolver-c1f743ab2e4a7046d5500875a47d1f62c8624603.zip
Adding upstream version 5.7.1.upstream/5.7.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'modules/workarounds')
-rw-r--r--modules/workarounds/.packaging/test.config4
-rw-r--r--modules/workarounds/README.rst11
-rw-r--r--modules/workarounds/workarounds.lua23
3 files changed, 38 insertions, 0 deletions
diff --git a/modules/workarounds/.packaging/test.config b/modules/workarounds/.packaging/test.config
new file mode 100644
index 0000000..c420810
--- /dev/null
+++ b/modules/workarounds/.packaging/test.config
@@ -0,0 +1,4 @@
+-- SPDX-License-Identifier: GPL-3.0-or-later
+modules.load('workarounds')
+assert(workarounds)
+quit()
diff --git a/modules/workarounds/README.rst b/modules/workarounds/README.rst
new file mode 100644
index 0000000..fcb04aa
--- /dev/null
+++ b/modules/workarounds/README.rst
@@ -0,0 +1,11 @@
+.. SPDX-License-Identifier: GPL-3.0-or-later
+
+.. _mod-workarounds:
+
+Module `workarounds` resolver behavior on specific broken sub-domains.
+Currently it mainly disables case randomization.
+
+.. code-block:: lua
+
+ modules.load('workarounds < iterate')
+
diff --git a/modules/workarounds/workarounds.lua b/modules/workarounds/workarounds.lua
new file mode 100644
index 0000000..4ce7c47
--- /dev/null
+++ b/modules/workarounds/workarounds.lua
@@ -0,0 +1,23 @@
+-- SPDX-License-Identifier: GPL-3.0-or-later
+-- Load dependent module
+if not policy then modules.load('policy') end
+
+local M = {} -- the module
+
+function M.config()
+ policy.add(policy.suffix(policy.FLAGS('NO_0X20'), {
+ -- https://github.com/DNS-OARC/dns-violations/blob/master/2017/DVE-2017-0003.md
+ todname('avqs.mcafee.com'), todname('avts.mcafee.com'),
+
+ -- https://github.com/DNS-OARC/dns-violations/blob/master/2017/DVE-2017-0006.md
+ -- Obtained via a reverse search on {ns1,ns3}.panthercdn.com.
+ todname('cdnga.com'), todname('cdngc.com'), todname('cdngd.com'),
+ todname('cdngl.com'), todname('cdngm.com'),
+ todname('cdngc.net'), todname('panthercdn.com'),
+
+ todname('magazine-fashion.net.'),
+ }))
+end
+
+return M
+