echo "FallbackDNS="
echo "DNSSEC=allow-downgrade"
echo "DNSOverTLS=opportunistic"
- } >/run/systemd/resolved.conf.d/test.conf
+ } >/run/systemd/resolved.conf.d/10-test.conf
ln -svf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
# Override the default NTA list, which turns off DNSSEC validation for (among
# others) the test. domain
# Cleanup
# shellcheck disable=SC2317
cleanup() {
- rm -f /run/systemd/resolved.conf.d/mdns-llmnr.conf
ip link del hoge
ip link del hoge.foo
}
# Cleanup
cleanup() {
- rm -f /run/systemd/resolved.conf.d/mdns-llmnr.conf
+ rm -f /run/systemd/resolved.conf.d/90-mdns-llmnr.conf
ip link del hoge
ip link del hoge.foo
}
echo "[Resolve]"
echo "MulticastDNS=no"
echo "LLMNR=no"
- } >/run/systemd/resolved.conf.d/mdns-llmnr.conf
+ } >/run/systemd/resolved.conf.d/90-mdns-llmnr.conf
restart_resolved
# make sure networkd is not running.
systemctl stop systemd-networkd.service
echo "[Resolve]"
echo "MulticastDNS=yes"
echo "LLMNR=yes"
- } >/run/systemd/resolved.conf.d/mdns-llmnr.conf
+ } >/run/systemd/resolved.conf.d/90-mdns-llmnr.conf
systemctl reload systemd-resolved.service
# defaults to yes (both the global and per-link settings are yes)
assert_in 'yes' "$(resolvectl mdns hoge)"
echo "[Resolve]"
echo "MulticastDNS=resolve"
echo "LLMNR=resolve"
- } >/run/systemd/resolved.conf.d/mdns-llmnr.conf
+ } >/run/systemd/resolved.conf.d/90-mdns-llmnr.conf
systemctl reload systemd-resolved.service
# set per-link setting
resolvectl mdns hoge yes
echo "[Resolve]"
echo "MulticastDNS=no"
echo "LLMNR=no"
- } >/run/systemd/resolved.conf.d/mdns-llmnr.conf
+ } >/run/systemd/resolved.conf.d/90-mdns-llmnr.conf
systemctl reload systemd-resolved.service
(! lsof -p "$(systemctl show --property MainPID --value systemd-resolved.service)" | grep -q ":mdns\|:5353")
# set per-link setting
{
echo "[Resolve]"
echo "StaleRetentionSec=1d"
- } >/run/systemd/resolved.conf.d/test.conf
+ } >/run/systemd/resolved.conf.d/10-test.conf
systemctl reload systemd-resolved.service
run dig stale1.unsigned.test -t A
# Cleanup
# shellcheck disable=SC2317
cleanup() {
- rm -f /run/systemd/resolved.conf.d/reload.conf
+ rm -f /run/systemd/resolved.conf.d/90-reload.conf
systemctl reload systemd-resolved.service
resolvectl revert dns0
}
echo "[Resolve]"
echo "DNS=8.8.8.8"
echo "DNSStubListenerExtra=127.0.0.153"
- } >/run/systemd/resolved.conf.d/reload.conf
+ } >/run/systemd/resolved.conf.d/90-reload.conf
resolvectl dns dns0 1.1.1.1
systemctl reload systemd-resolved.service
resolvectl status
echo "[Resolve]"
echo "DNS=8.8.4.4"
echo "DNSStubListenerExtra=127.0.0.154"
- } >/run/systemd/resolved.conf.d/reload.conf
+ } >/run/systemd/resolved.conf.d/90-reload.conf
systemctl reload systemd-resolved.service
resolvectl status
echo "===== io.systemd.Resolve.Monitor.SubscribeDNSConfiguration output: ====="
cat "$tmpfile"
echo "=========="
- rm -f /run/systemd/resolved.conf.d/global-dns.conf
+ rm -f /run/systemd/resolved.conf.d/90-global-dns.conf
restart_resolved
resolvectl revert dns0
}
{
echo "[Resolve]"
echo "DNS="
- } > /run/systemd/resolved.conf.d/global-dns.conf
+ } > /run/systemd/resolved.conf.d/90-global-dns.conf
systemctl reload systemd-resolved.service
resolvectl dns dns0 ""
resolvectl domain dns0 ""
echo "[Resolve]"
echo "DNS=8.8.8.8"
echo "Domains=lan"
- } > /run/systemd/resolved.conf.d/global-dns.conf
+ } > /run/systemd/resolved.conf.d/90-global-dns.conf
systemctl reload systemd-resolved.service
# Update a link configuration.
testcase_14_refuse_record_types() {
# shellcheck disable=SC2317
cleanup() {
- rm -f /run/systemd/resolved.conf.d/refuserecords.conf
+ rm -f /run/systemd/resolved.conf.d/90-refuserecords.conf
restart_resolved
}
trap cleanup RETURN ERR
{
echo "[Resolve]"
echo "RefuseRecordTypes=AAAA SRV TXT"
- } >/run/systemd/resolved.conf.d/refuserecords.conf
+ } >/run/systemd/resolved.conf.d/90-refuserecords.conf
systemctl reload systemd-resolved.service
run dig localhost -t AAAA
{
echo "[Resolve]"
echo "RefuseRecordTypes=AAAA"
- } >/run/systemd/resolved.conf.d/refuserecords.conf
+ } >/run/systemd/resolved.conf.d/90-refuserecords.conf
systemctl reload systemd-resolved.service
run dig localhost -t SRV
{
echo "[Resolve]"
echo "RefuseRecordTypes=A AAAA"
- } >/run/systemd/resolved.conf.d/refuserecords.conf
+ } >/run/systemd/resolved.conf.d/90-refuserecords.conf
systemctl reload systemd-resolved.service
run resolvectl service _mysvc._tcp signed.test
{
echo "[Resolve]"
echo "RefuseRecordTypes=AAAA TXT"
- } >/run/systemd/resolved.conf.d/refuserecords.conf
+ } >/run/systemd/resolved.conf.d/90-refuserecords.conf
systemctl reload systemd-resolved.service
run resolvectl service _mysvc._tcp signed.test
{
echo "[Resolve]"
echo "RefuseRecordTypes=SRV"
- } >/run/systemd/resolved.conf.d/refuserecords.conf
+ } >/run/systemd/resolved.conf.d/90-refuserecords.conf
systemctl reload systemd-resolved.service
(! run resolvectl service _mysvc._tcp signed.test)