|
|
2aacef |
From 6aa57233e5981473efb4fdc4351d8f407b0b5384 Mon Sep 17 00:00:00 2001
|
|
|
2aacef |
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
|
|
2aacef |
Date: Fri, 8 Jul 2022 13:36:03 +0200
|
|
|
2aacef |
Subject: [PATCH] test: cover IPv6 in the resolved test suite
|
|
|
2aacef |
|
|
|
2aacef |
(cherry picked from commit 5c9111fe779b44745256279052786e9cc499e57a)
|
|
|
2aacef |
|
|
|
2aacef |
Related: #2138081
|
|
|
2aacef |
---
|
|
|
2aacef |
test/knot-data/knot.conf | 3 +
|
|
|
2aacef |
test/knot-data/zones/onlinesign.test.zone | 15 ++-
|
|
|
2aacef |
test/knot-data/zones/root.zone | 8 +-
|
|
|
2aacef |
test/knot-data/zones/signed.test.zone | 23 ++--
|
|
|
2aacef |
test/knot-data/zones/test.zone | 12 +-
|
|
|
2aacef |
test/knot-data/zones/unsigned.test.zone | 12 +-
|
|
|
2aacef |
test/knot-data/zones/untrusted.test.zone | 11 +-
|
|
|
2aacef |
test/units/testsuite-75.sh | 135 ++++++++++++++++++----
|
|
|
2aacef |
8 files changed, 169 insertions(+), 50 deletions(-)
|
|
|
2aacef |
|
|
|
2aacef |
diff --git a/test/knot-data/knot.conf b/test/knot-data/knot.conf
|
|
|
2aacef |
index e3de69d0f4..6ea0cca3db 100644
|
|
|
2aacef |
--- a/test/knot-data/knot.conf
|
|
|
2aacef |
+++ b/test/knot-data/knot.conf
|
|
|
2aacef |
@@ -4,6 +4,7 @@ server:
|
|
|
2aacef |
rundir: "/run/knot"
|
|
|
2aacef |
user: knot:knot
|
|
|
2aacef |
listen: 10.0.0.1@53
|
|
|
2aacef |
+ listen: fd00:dead:beef:cafe::1@53
|
|
|
2aacef |
|
|
|
2aacef |
log:
|
|
|
2aacef |
- target: syslog
|
|
|
2aacef |
@@ -15,11 +16,13 @@ database:
|
|
|
2aacef |
acl:
|
|
|
2aacef |
- id: update_acl
|
|
|
2aacef |
address: 10.0.0.0/24
|
|
|
2aacef |
+ address: fd00:dead:beef:cafe::/64
|
|
|
2aacef |
action: update
|
|
|
2aacef |
|
|
|
2aacef |
remote:
|
|
|
2aacef |
- id: parent_zone_server
|
|
|
2aacef |
address: 10.0.0.1@53
|
|
|
2aacef |
+ address: fd00:dead:beef:cafe::1@53
|
|
|
2aacef |
|
|
|
2aacef |
submission:
|
|
|
2aacef |
- id: parent_zone_sbm
|
|
|
2aacef |
diff --git a/test/knot-data/zones/onlinesign.test.zone b/test/knot-data/zones/onlinesign.test.zone
|
|
|
2aacef |
index c12c6b3396..c8662fa3ed 100644
|
|
|
2aacef |
--- a/test/knot-data/zones/onlinesign.test.zone
|
|
|
2aacef |
+++ b/test/knot-data/zones/onlinesign.test.zone
|
|
|
2aacef |
@@ -11,12 +11,17 @@ $ORIGIN onlinesign.test.
|
|
|
2aacef |
)
|
|
|
2aacef |
|
|
|
2aacef |
; NS info
|
|
|
2aacef |
- NS ns1.unsigned.test.
|
|
|
2aacef |
+ NS ns1.unsigned.test.
|
|
|
2aacef |
|
|
|
2aacef |
- TXT "hello from onlinesign"
|
|
|
2aacef |
+ TXT "hello from onlinesign"
|
|
|
2aacef |
|
|
|
2aacef |
-*.wild TXT "this is an onlinesign wildcard"
|
|
|
2aacef |
+*.wild TXT "this is an onlinesign wildcard"
|
|
|
2aacef |
|
|
|
2aacef |
; No A/AAAA record for the $ORIGIN
|
|
|
2aacef |
-sub A 10.0.0.133
|
|
|
2aacef |
-secondsub A 10.0.0.134
|
|
|
2aacef |
+sub A 10.0.0.133
|
|
|
2aacef |
+secondsub A 10.0.0.134
|
|
|
2aacef |
+
|
|
|
2aacef |
+dual A 10.0.0.135
|
|
|
2aacef |
+dual AAAA fd00:dead:beef:cafe::135
|
|
|
2aacef |
+
|
|
|
2aacef |
+ipv6 AAAA fd00:dead:beef:cafe::136
|
|
|
2aacef |
diff --git a/test/knot-data/zones/root.zone b/test/knot-data/zones/root.zone
|
|
|
2aacef |
index 72439fdc55..f601e8676d 100644
|
|
|
2aacef |
--- a/test/knot-data/zones/root.zone
|
|
|
2aacef |
+++ b/test/knot-data/zones/root.zone
|
|
|
2aacef |
@@ -8,7 +8,9 @@ $TTL 300
|
|
|
2aacef |
1D ; minimum TTL
|
|
|
2aacef |
)
|
|
|
2aacef |
|
|
|
2aacef |
-. NS ns1.unsigned.test
|
|
|
2aacef |
-ns1.unsigned.test A 10.0.0.1
|
|
|
2aacef |
+. NS ns1.unsigned.test
|
|
|
2aacef |
+; NS glue records
|
|
|
2aacef |
+ns1.unsigned.test A 10.0.0.1
|
|
|
2aacef |
+ns1.unsigned.test AAAA fd00:dead:beef:cafe::1
|
|
|
2aacef |
|
|
|
2aacef |
-test NS ns1.unsigned.test
|
|
|
2aacef |
+test NS ns1.unsigned.test
|
|
|
2aacef |
diff --git a/test/knot-data/zones/signed.test.zone b/test/knot-data/zones/signed.test.zone
|
|
|
2aacef |
index 38d8e2aa13..fa6706205a 100644
|
|
|
2aacef |
--- a/test/knot-data/zones/signed.test.zone
|
|
|
2aacef |
+++ b/test/knot-data/zones/signed.test.zone
|
|
|
2aacef |
@@ -11,18 +11,27 @@ $ORIGIN signed.test.
|
|
|
2aacef |
)
|
|
|
2aacef |
|
|
|
2aacef |
; NS info
|
|
|
2aacef |
- NS ns1.unsigned.test.
|
|
|
2aacef |
+ NS ns1.unsigned.test.
|
|
|
2aacef |
|
|
|
2aacef |
-*.wild TXT "this is a wildcard"
|
|
|
2aacef |
+*.wild TXT "this is a wildcard"
|
|
|
2aacef |
|
|
|
2aacef |
-@ MX 10 mail.signed.test.
|
|
|
2aacef |
+@ MX 10 mail.signed.test.
|
|
|
2aacef |
|
|
|
2aacef |
- A 10.0.0.10
|
|
|
2aacef |
-mail A 10.0.0.11
|
|
|
2aacef |
+ A 10.0.0.10
|
|
|
2aacef |
+mail A 10.0.0.11
|
|
|
2aacef |
+mail AAAA fd00:dead:beef:cafe::11
|
|
|
2aacef |
|
|
|
2aacef |
; https://github.com/systemd/systemd/issues/22002
|
|
|
2aacef |
-dupe A 10.0.0.12
|
|
|
2aacef |
-dupe A 10.0.0.13
|
|
|
2aacef |
+dupe A 10.0.0.12
|
|
|
2aacef |
+dupe A 10.0.0.13
|
|
|
2aacef |
+dupe-ipv6 AAAA fd00:dead:beef:cafe::12
|
|
|
2aacef |
+dupe-ipv6 AAAA fd00:dead:beef:cafe::13
|
|
|
2aacef |
+dupe-mixed A 10.0.0.15
|
|
|
2aacef |
+dupe-mixed A 10.0.0.16
|
|
|
2aacef |
+dupe-mixed A 10.0.0.17
|
|
|
2aacef |
+dupe-mixed AAAA fd00:dead:beef:cafe::15
|
|
|
2aacef |
+dupe-mixed AAAA fd00:dead:beef:cafe::16
|
|
|
2aacef |
+dupe-mixed AAAA fd00:dead:beef:cafe::17
|
|
|
2aacef |
|
|
|
2aacef |
; CNAME_REDIRECTS_MAX is 16, so let's test something close to that
|
|
|
2aacef |
cname-chain CNAME follow1.signed.test.
|
|
|
2aacef |
diff --git a/test/knot-data/zones/test.zone b/test/knot-data/zones/test.zone
|
|
|
2aacef |
index 6cc2633082..ba5fcebc2d 100644
|
|
|
2aacef |
--- a/test/knot-data/zones/test.zone
|
|
|
2aacef |
+++ b/test/knot-data/zones/test.zone
|
|
|
2aacef |
@@ -11,9 +11,11 @@ $ORIGIN test.
|
|
|
2aacef |
)
|
|
|
2aacef |
|
|
|
2aacef |
; NS info
|
|
|
2aacef |
-@ NS ns1.unsigned
|
|
|
2aacef |
-ns1.signed A 10.0.0.1
|
|
|
2aacef |
+@ NS ns1.unsigned
|
|
|
2aacef |
+; NS glue records
|
|
|
2aacef |
+ns1.unsigned A 10.0.0.1
|
|
|
2aacef |
+ns1.unsigned AAAA fd00:dead:beef:cafe::1
|
|
|
2aacef |
|
|
|
2aacef |
-onlinesign NS ns1.unsigned
|
|
|
2aacef |
-signed NS ns1.unsigned
|
|
|
2aacef |
-unsigned NS ns1.unsigned
|
|
|
2aacef |
+onlinesign NS ns1.unsigned
|
|
|
2aacef |
+signed NS ns1.unsigned
|
|
|
2aacef |
+unsigned NS ns1.unsigned
|
|
|
2aacef |
diff --git a/test/knot-data/zones/unsigned.test.zone b/test/knot-data/zones/unsigned.test.zone
|
|
|
2aacef |
index 87d9437e2c..c5445d7672 100644
|
|
|
2aacef |
--- a/test/knot-data/zones/unsigned.test.zone
|
|
|
2aacef |
+++ b/test/knot-data/zones/unsigned.test.zone
|
|
|
2aacef |
@@ -11,10 +11,12 @@ $ORIGIN unsigned.test.
|
|
|
2aacef |
)
|
|
|
2aacef |
|
|
|
2aacef |
; NS info
|
|
|
2aacef |
-@ NS ns1.unsigned.test.
|
|
|
2aacef |
-ns1 A 10.0.0.1
|
|
|
2aacef |
+@ NS ns1
|
|
|
2aacef |
+ns1 A 10.0.0.1
|
|
|
2aacef |
+ns1 AAAA fd00:dead:beef:cafe::1
|
|
|
2aacef |
|
|
|
2aacef |
-@ MX 15 mail.unsigned.test.
|
|
|
2aacef |
+@ MX 15 mail.unsigned.test.
|
|
|
2aacef |
|
|
|
2aacef |
- A 10.0.0.101
|
|
|
2aacef |
-mail A 10.0.0.111
|
|
|
2aacef |
+ A 10.0.0.101
|
|
|
2aacef |
+ AAAA fd00:dead:beef:cafe::101
|
|
|
2aacef |
+mail A 10.0.0.111
|
|
|
2aacef |
diff --git a/test/knot-data/zones/untrusted.test.zone b/test/knot-data/zones/untrusted.test.zone
|
|
|
2aacef |
index 6d29bd77fe..cf0dec5296 100644
|
|
|
2aacef |
--- a/test/knot-data/zones/untrusted.test.zone
|
|
|
2aacef |
+++ b/test/knot-data/zones/untrusted.test.zone
|
|
|
2aacef |
@@ -11,11 +11,12 @@ $ORIGIN untrusted.test.
|
|
|
2aacef |
)
|
|
|
2aacef |
|
|
|
2aacef |
; NS info
|
|
|
2aacef |
-@ NS ns1.unsigned.test.
|
|
|
2aacef |
+@ NS ns1.unsigned.test.
|
|
|
2aacef |
|
|
|
2aacef |
-*.wild TXT "this is an untrusted wildcard"
|
|
|
2aacef |
+*.wild TXT "this is an untrusted wildcard"
|
|
|
2aacef |
|
|
|
2aacef |
-@ MX 10 mail.untrusted.test.
|
|
|
2aacef |
+@ MX 10 mail.untrusted.test.
|
|
|
2aacef |
|
|
|
2aacef |
- A 10.0.0.121
|
|
|
2aacef |
-mail A 10.0.0.121
|
|
|
2aacef |
+ A 10.0.0.121
|
|
|
2aacef |
+ AAAA fd00:dead:beef:cafe::121
|
|
|
2aacef |
+mail A 10.0.0.122
|
|
|
2aacef |
diff --git a/test/units/testsuite-75.sh b/test/units/testsuite-75.sh
|
|
|
2aacef |
index 852caac605..76b8f5b3c7 100755
|
|
|
2aacef |
--- a/test/units/testsuite-75.sh
|
|
|
2aacef |
+++ b/test/units/testsuite-75.sh
|
|
|
2aacef |
@@ -2,6 +2,12 @@
|
|
|
2aacef |
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
2aacef |
# vi: ts=4 sw=4 tw=0 et:
|
|
|
2aacef |
|
|
|
2aacef |
+# TODO:
|
|
|
2aacef |
+# - IPv6-only stack
|
|
|
2aacef |
+# - mDNS
|
|
|
2aacef |
+# - LLMNR
|
|
|
2aacef |
+# - DoT/DoH
|
|
|
2aacef |
+
|
|
|
2aacef |
set -eux
|
|
|
2aacef |
set -o pipefail
|
|
|
2aacef |
|
|
|
2aacef |
@@ -16,6 +22,15 @@ run() {
|
|
|
2aacef |
"$@" |& tee "$RUN_OUT"
|
|
|
2aacef |
}
|
|
|
2aacef |
|
|
|
2aacef |
+disable_ipv6() {
|
|
|
2aacef |
+ sysctl -w net.ipv6.conf.all.disable_ipv6=1
|
|
|
2aacef |
+}
|
|
|
2aacef |
+
|
|
|
2aacef |
+enable_ipv6() {
|
|
|
2aacef |
+ sysctl -w net.ipv6.conf.all.disable_ipv6=0
|
|
|
2aacef |
+ networkctl reconfigure dns0
|
|
|
2aacef |
+}
|
|
|
2aacef |
+
|
|
|
2aacef |
monitor_check_rr() (
|
|
|
2aacef |
set +x
|
|
|
2aacef |
set +o pipefail
|
|
|
2aacef |
@@ -146,7 +161,10 @@ ip link del hoge.foo
|
|
|
2aacef |
### SETUP ###
|
|
|
2aacef |
# Configure network
|
|
|
2aacef |
hostnamectl hostname ns1.unsigned.test
|
|
|
2aacef |
-echo "10.0.0.1 ns1.unsigned.test" >>/etc/hosts
|
|
|
2aacef |
+{
|
|
|
2aacef |
+ echo "10.0.0.1 ns1.unsigned.test"
|
|
|
2aacef |
+ echo "fd00:dead:beef:cafe::1 ns1.unsigned.test"
|
|
|
2aacef |
+} >>/etc/hosts
|
|
|
2aacef |
|
|
|
2aacef |
mkdir -p /etc/systemd/network
|
|
|
2aacef |
cat >/etc/systemd/network/dns0.netdev <
|
|
|
2aacef |
@@ -160,10 +178,17 @@ Name=dns0
|
|
|
2aacef |
|
|
|
2aacef |
[Network]
|
|
|
2aacef |
Address=10.0.0.1/24
|
|
|
2aacef |
+Address=fd00:dead:beef:cafe::1/64
|
|
|
2aacef |
DNSSEC=allow-downgrade
|
|
|
2aacef |
DNS=10.0.0.1
|
|
|
2aacef |
+DNS=fd00:dead:beef:cafe::1
|
|
|
2aacef |
EOF
|
|
|
2aacef |
|
|
|
2aacef |
+DNS_ADDRESSES=(
|
|
|
2aacef |
+ "10.0.0.1"
|
|
|
2aacef |
+ "fd00:dead:beef:cafe::1"
|
|
|
2aacef |
+)
|
|
|
2aacef |
+
|
|
|
2aacef |
mkdir -p /run/systemd/resolved.conf.d
|
|
|
2aacef |
{
|
|
|
2aacef |
echo "[Resolve]"
|
|
|
2aacef |
@@ -214,6 +239,10 @@ resolvectl log-level debug
|
|
|
2aacef |
# Start monitoring queries
|
|
|
2aacef |
systemd-run -u resmontest.service -p Type=notify resolvectl monitor
|
|
|
2aacef |
|
|
|
2aacef |
+# Check if all the zones are valid (zone-check always returns 0, so let's check
|
|
|
2aacef |
+# if it produces any errors/warnings)
|
|
|
2aacef |
+run knotc zone-check
|
|
|
2aacef |
+[[ ! -s "$RUN_OUT" ]]
|
|
|
2aacef |
# We need to manually propagate the DS records of onlinesign.test. to the parent
|
|
|
2aacef |
# zone, since they're generated online
|
|
|
2aacef |
knotc zone-begin test.
|
|
|
2aacef |
@@ -234,9 +263,19 @@ knotc reload
|
|
|
2aacef |
: "--- nss-resolve/nss-myhostname tests"
|
|
|
2aacef |
# Sanity check
|
|
|
2aacef |
TIMESTAMP=$(date '+%F %T')
|
|
|
2aacef |
+# Issue: https://github.com/systemd/systemd/issues/23951
|
|
|
2aacef |
+# With IPv6 enabled
|
|
|
2aacef |
run getent -s resolve hosts ns1.unsigned.test
|
|
|
2aacef |
-grep -qE "^10\.0\.0\.1\s+ns1\.unsigned\.test" "$RUN_OUT"
|
|
|
2aacef |
-monitor_check_rr "$TIMESTAMP" "ns1.unsigned.test IN A 10.0.0.1"
|
|
|
2aacef |
+grep -qE "^fd00:dead:beef:cafe::1\s+ns1\.unsigned\.test" "$RUN_OUT"
|
|
|
2aacef |
+monitor_check_rr "$TIMESTAMP" "ns1.unsigned.test IN AAAA fd00:dead:beef:cafe::1"
|
|
|
2aacef |
+# With IPv6 disabled
|
|
|
2aacef |
+# Issue: https://github.com/systemd/systemd/issues/23951
|
|
|
2aacef |
+# FIXME
|
|
|
2aacef |
+#disable_ipv6
|
|
|
2aacef |
+#run getent -s resolve hosts ns1.unsigned.test
|
|
|
2aacef |
+#grep -qE "^10\.0\.0\.1\s+ns1\.unsigned\.test" "$RUN_OUT"
|
|
|
2aacef |
+#monitor_check_rr "$TIMESTAMP" "ns1.unsigned.test IN A 10.0.0.1"
|
|
|
2aacef |
+enable_ipv6
|
|
|
2aacef |
|
|
|
2aacef |
# Issue: https://github.com/systemd/systemd/issues/18812
|
|
|
2aacef |
# PR: https://github.com/systemd/systemd/pull/18896
|
|
|
2aacef |
@@ -248,13 +287,12 @@ grep -qE "^::1\s+localhost" "$RUN_OUT"
|
|
|
2aacef |
run getent -s myhostname hosts localhost
|
|
|
2aacef |
grep -qE "^::1\s+localhost" "$RUN_OUT"
|
|
|
2aacef |
# With IPv6 disabled
|
|
|
2aacef |
-sysctl -w net.ipv6.conf.all.disable_ipv6=1
|
|
|
2aacef |
+disable_ipv6
|
|
|
2aacef |
run getent -s resolve hosts localhost
|
|
|
2aacef |
grep -qE "^127\.0\.0\.1\s+localhost" "$RUN_OUT"
|
|
|
2aacef |
run getent -s myhostname hosts localhost
|
|
|
2aacef |
grep -qE "^127\.0\.0\.1\s+localhost" "$RUN_OUT"
|
|
|
2aacef |
-sysctl -w net.ipv6.conf.all.disable_ipv6=0
|
|
|
2aacef |
-
|
|
|
2aacef |
+enable_ipv6
|
|
|
2aacef |
|
|
|
2aacef |
: "--- Basic resolved tests ---"
|
|
|
2aacef |
# Issue: https://github.com/systemd/systemd/issues/22229
|
|
|
2aacef |
@@ -280,12 +318,14 @@ grep -qE "IN\s+SOA\s+ns1\.unsigned\.test\." "$RUN_OUT"
|
|
|
2aacef |
|
|
|
2aacef |
|
|
|
2aacef |
: "--- ZONE: unsigned.test. ---"
|
|
|
2aacef |
-run dig @10.0.0.1 +short unsigned.test
|
|
|
2aacef |
+run dig @ns1.unsigned.test +short unsigned.test A unsigned.test AAAA
|
|
|
2aacef |
grep -qF "10.0.0.101" "$RUN_OUT"
|
|
|
2aacef |
+grep -qF "fd00:dead:beef:cafe::101" "$RUN_OUT"
|
|
|
2aacef |
run resolvectl query unsigned.test
|
|
|
2aacef |
-grep -qF "unsigned.test: 10.0.0.10" "$RUN_OUT"
|
|
|
2aacef |
+grep -qF "10.0.0.10" "$RUN_OUT"
|
|
|
2aacef |
+grep -qF "fd00:dead:beef:cafe::101" "$RUN_OUT"
|
|
|
2aacef |
grep -qF "authenticated: no" "$RUN_OUT"
|
|
|
2aacef |
-run dig @10.0.0.1 +short MX unsigned.test
|
|
|
2aacef |
+run dig @ns1.unsigned.test +short MX unsigned.test
|
|
|
2aacef |
grep -qF "15 mail.unsigned.test." "$RUN_OUT"
|
|
|
2aacef |
run resolvectl query --legend=no -t MX unsigned.test
|
|
|
2aacef |
grep -qF "unsigned.test IN MX 15 mail.unsigned.test" "$RUN_OUT"
|
|
|
2aacef |
@@ -295,17 +335,28 @@ grep -qF "unsigned.test IN MX 15 mail.unsigned.test" "$RUN_OUT"
|
|
|
2aacef |
# Check the trust chain (with and without systemd-resolved in between
|
|
|
2aacef |
# Issue: https://github.com/systemd/systemd/issues/22002
|
|
|
2aacef |
# PR: https://github.com/systemd/systemd/pull/23289
|
|
|
2aacef |
-run delv @10.0.0.1 signed.test
|
|
|
2aacef |
+run delv @ns1.unsigned.test signed.test
|
|
|
2aacef |
grep -qF "; fully validated" "$RUN_OUT"
|
|
|
2aacef |
run delv signed.test
|
|
|
2aacef |
grep -qF "; fully validated" "$RUN_OUT"
|
|
|
2aacef |
|
|
|
2aacef |
+for addr in "${DNS_ADDRESSES[@]}"; do
|
|
|
2aacef |
+ run delv "@$addr" -t A mail.signed.test
|
|
|
2aacef |
+ grep -qF "; fully validated" "$RUN_OUT"
|
|
|
2aacef |
+ run delv "@$addr" -t AAAA mail.signed.test
|
|
|
2aacef |
+ grep -qF "; fully validated" "$RUN_OUT"
|
|
|
2aacef |
+done
|
|
|
2aacef |
+run resolvectl query mail.signed.test
|
|
|
2aacef |
+grep -qF "10.0.0.11" "$RUN_OUT"
|
|
|
2aacef |
+grep -qF "fd00:dead:beef:cafe::11" "$RUN_OUT"
|
|
|
2aacef |
+grep -qF "authenticated: yes" "$RUN_OUT"
|
|
|
2aacef |
+
|
|
|
2aacef |
run dig +short signed.test
|
|
|
2aacef |
grep -qF "10.0.0.10" "$RUN_OUT"
|
|
|
2aacef |
run resolvectl query signed.test
|
|
|
2aacef |
grep -qF "signed.test: 10.0.0.10" "$RUN_OUT"
|
|
|
2aacef |
grep -qF "authenticated: yes" "$RUN_OUT"
|
|
|
2aacef |
-run dig @10.0.0.1 +short MX signed.test
|
|
|
2aacef |
+run dig @ns1.unsigned.test +short MX signed.test
|
|
|
2aacef |
grep -qF "10 mail.signed.test." "$RUN_OUT"
|
|
|
2aacef |
run resolvectl query --legend=no -t MX signed.test
|
|
|
2aacef |
grep -qF "signed.test IN MX 10 mail.signed.test" "$RUN_OUT"
|
|
|
2aacef |
@@ -320,10 +371,30 @@ grep -qF "authenticated: yes" "$RUN_OUT"
|
|
|
2aacef |
# DNSSEC validation with multiple records of the same type for the same name
|
|
|
2aacef |
# Issue: https://github.com/systemd/systemd/issues/22002
|
|
|
2aacef |
# PR: https://github.com/systemd/systemd/pull/23289
|
|
|
2aacef |
-run delv @10.0.0.1 dupe.signed.test
|
|
|
2aacef |
-grep -qF "; fully validated" "$RUN_OUT"
|
|
|
2aacef |
-run delv dupe.signed.test
|
|
|
2aacef |
-grep -qF "; fully validated" "$RUN_OUT"
|
|
|
2aacef |
+check_domain() {
|
|
|
2aacef |
+ local domain="${1:?}"
|
|
|
2aacef |
+ local record="${2:?}"
|
|
|
2aacef |
+ local message="${3:?}"
|
|
|
2aacef |
+ local addr
|
|
|
2aacef |
+
|
|
|
2aacef |
+ for addr in "${DNS_ADDRESSES[@]}"; do
|
|
|
2aacef |
+ run delv "@$addr" -t "$record" "$domain"
|
|
|
2aacef |
+ grep -qF "$message" "$RUN_OUT"
|
|
|
2aacef |
+ done
|
|
|
2aacef |
+
|
|
|
2aacef |
+ run delv -t "$record" "$domain"
|
|
|
2aacef |
+ grep -qF "$message" "$RUN_OUT"
|
|
|
2aacef |
+
|
|
|
2aacef |
+ run resolvectl query "$domain"
|
|
|
2aacef |
+ grep -qF "authenticated: yes" "$RUN_OUT"
|
|
|
2aacef |
+}
|
|
|
2aacef |
+
|
|
|
2aacef |
+check_domain "dupe.signed.test" "A" "; fully validated"
|
|
|
2aacef |
+check_domain "dupe.signed.test" "AAAA" "; negative response, fully validated"
|
|
|
2aacef |
+check_domain "dupe-ipv6.signed.test" "AAAA" "; fully validated"
|
|
|
2aacef |
+check_domain "dupe-ipv6.signed.test" "A" "; negative response, fully validated"
|
|
|
2aacef |
+check_domain "dupe-mixed.signed.test" "A" "; fully validated"
|
|
|
2aacef |
+check_domain "dupe-mixed.signed.test" "AAAA" "; fully validated"
|
|
|
2aacef |
|
|
|
2aacef |
# Test resolution of CNAME chains
|
|
|
2aacef |
TIMESTAMP=$(date '+%F %T')
|
|
|
2aacef |
@@ -347,7 +418,7 @@ grep -qE "^follow14\.final\.signed\.test\..+IN\s+NSEC\s+" "$RUN_OUT"
|
|
|
2aacef |
# Check the trust chain (with and without systemd-resolved in between
|
|
|
2aacef |
# Issue: https://github.com/systemd/systemd/issues/22002
|
|
|
2aacef |
# PR: https://github.com/systemd/systemd/pull/23289
|
|
|
2aacef |
-run delv @10.0.0.1 sub.onlinesign.test
|
|
|
2aacef |
+run delv @ns1.unsigned.test sub.onlinesign.test
|
|
|
2aacef |
grep -qF "; fully validated" "$RUN_OUT"
|
|
|
2aacef |
run delv sub.onlinesign.test
|
|
|
2aacef |
grep -qF "; fully validated" "$RUN_OUT"
|
|
|
2aacef |
@@ -357,10 +428,27 @@ grep -qF "10.0.0.133" "$RUN_OUT"
|
|
|
2aacef |
run resolvectl query sub.onlinesign.test
|
|
|
2aacef |
grep -qF "sub.onlinesign.test: 10.0.0.133" "$RUN_OUT"
|
|
|
2aacef |
grep -qF "authenticated: yes" "$RUN_OUT"
|
|
|
2aacef |
-run dig @10.0.0.1 +short TXT onlinesign.test
|
|
|
2aacef |
+run dig @ns1.unsigned.test +short TXT onlinesign.test
|
|
|
2aacef |
grep -qF '"hello from onlinesign"' "$RUN_OUT"
|
|
|
2aacef |
run resolvectl query --legend=no -t TXT onlinesign.test
|
|
|
2aacef |
grep -qF 'onlinesign.test IN TXT "hello from onlinesign"' "$RUN_OUT"
|
|
|
2aacef |
+
|
|
|
2aacef |
+for addr in "${DNS_ADDRESSES[@]}"; do
|
|
|
2aacef |
+ run delv "@$addr" -t A dual.onlinesign.test
|
|
|
2aacef |
+ grep -qF "10.0.0.135" "$RUN_OUT"
|
|
|
2aacef |
+ run delv "@$addr" -t AAAA dual.onlinesign.test
|
|
|
2aacef |
+ grep -qF "fd00:dead:beef:cafe::135" "$RUN_OUT"
|
|
|
2aacef |
+ run delv "@$addr" -t ANY ipv6.onlinesign.test
|
|
|
2aacef |
+ grep -qF "fd00:dead:beef:cafe::136" "$RUN_OUT"
|
|
|
2aacef |
+done
|
|
|
2aacef |
+run resolvectl query dual.onlinesign.test
|
|
|
2aacef |
+grep -qF "10.0.0.135" "$RUN_OUT"
|
|
|
2aacef |
+grep -qF "fd00:dead:beef:cafe::135" "$RUN_OUT"
|
|
|
2aacef |
+grep -qF "authenticated: yes" "$RUN_OUT"
|
|
|
2aacef |
+run resolvectl query ipv6.onlinesign.test
|
|
|
2aacef |
+grep -qF "fd00:dead:beef:cafe::136" "$RUN_OUT"
|
|
|
2aacef |
+grep -qF "authenticated: yes" "$RUN_OUT"
|
|
|
2aacef |
+
|
|
|
2aacef |
# Check a non-existent domain
|
|
|
2aacef |
# Note: mod-onlinesign utilizes Minimally Covering NSEC Records, hence the
|
|
|
2aacef |
# different response than with "standard" DNSSEC
|
|
|
2aacef |
@@ -378,11 +466,18 @@ run busctl call org.freedesktop.resolve1 /org/freedesktop/resolve1 org.freedeskt
|
|
|
2aacef |
grep -qF '10 0 0 134 "secondsub.onlinesign.test"' "$RUN_OUT"
|
|
|
2aacef |
monitor_check_rr "$TIMESTAMP" "secondsub.onlinesign.test IN A 10.0.0.134"
|
|
|
2aacef |
|
|
|
2aacef |
+
|
|
|
2aacef |
: "--- ZONE: untrusted.test (DNSSEC without propagated DS records) ---"
|
|
|
2aacef |
-run dig +short untrusted.test
|
|
|
2aacef |
-grep -qF "10.0.0.121" "$RUN_OUT"
|
|
|
2aacef |
+# Issue: https://github.com/systemd/systemd/issues/23955
|
|
|
2aacef |
+# FIXME
|
|
|
2aacef |
+resolvectl flush-caches
|
|
|
2aacef |
+#run dig +short untrusted.test A untrusted.test AAAA
|
|
|
2aacef |
+#grep -qF "10.0.0.121" "$RUN_OUT"
|
|
|
2aacef |
+#grep -qF "fd00:dead:beef:cafe::121" "$RUN_OUT"
|
|
|
2aacef |
run resolvectl query untrusted.test
|
|
|
2aacef |
-grep -qF "untrusted.test: 10.0.0.121" "$RUN_OUT"
|
|
|
2aacef |
+grep -qF "untrusted.test:" "$RUN_OUT"
|
|
|
2aacef |
+grep -qF "10.0.0.121" "$RUN_OUT"
|
|
|
2aacef |
+grep -qF "fd00:dead:beef:cafe::121" "$RUN_OUT"
|
|
|
2aacef |
grep -qF "authenticated: no" "$RUN_OUT"
|
|
|
2aacef |
|
|
|
2aacef |
# Issue: https://github.com/systemd/systemd/issues/19472
|