summaryrefslogtreecommitdiffstats
path: root/test/units
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-11-25 12:15:56 +0100
committerLennart Poettering <lennart@poettering.net>2022-11-25 17:37:30 +0100
commit17f244e8f9de008ea1c6e0880bdc924b95a66e2b (patch)
treecfb9a0d3b4ec727b54d2080f8b0703866957dc8d /test/units
parentresolved: don't filter _gateway/_outbound twice (diff)
downloadsystemd-17f244e8f9de008ea1c6e0880bdc924b95a66e2b.tar.xz
systemd-17f244e8f9de008ea1c6e0880bdc924b95a66e2b.zip
resolved: introduce the _localdnsstub and _localdnsproxy special hostnames for 127.0.0.54 + 127.0.0.53
Let's give these special IP addresses names. After all name resolution is our job here. Fixes: #23623
Diffstat (limited to 'test/units')
-rwxr-xr-xtest/units/testsuite-75.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/units/testsuite-75.sh b/test/units/testsuite-75.sh
index 1a656fcdc1..0c68e0636f 100755
--- a/test/units/testsuite-75.sh
+++ b/test/units/testsuite-75.sh
@@ -56,6 +56,17 @@ echo nameserver 10.0.3.3 10.0.3.4 | "$RESOLVCONF" -a hoge.foo.dhcp
assert_in '10.0.3.1 10.0.3.2' "$(resolvectl dns hoge)"
assert_in '10.0.3.3 10.0.3.4' "$(resolvectl dns hoge.foo)"
+# Tests for _localdnsstub and _localdnsproxy
+assert_in '127.0.0.53' "$(resolvectl query _localdnsstub)"
+assert_in '_localdnsstub' "$(resolvectl query 127.0.0.53)"
+assert_in '127.0.0.54' "$(resolvectl query _localdnsproxy)"
+assert_in '_localdnsproxy' "$(resolvectl query 127.0.0.54)"
+
+assert_in '127.0.0.53' "$(dig @127.0.0.53 _localdnsstub)"
+assert_in '_localdnsstub' "$(dig @127.0.0.53 -x 127.0.0.53)"
+assert_in '127.0.0.54' "$(dig @127.0.0.53 _localdnsproxy)"
+assert_in '_localdnsproxy' "$(dig @127.0.0.53 -x 127.0.0.54)"
+
# Tests for mDNS and LLMNR settings
mkdir -p /run/systemd/resolved.conf.d
{