1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-08 05:57:26 +03:00

networkd-test.py: disable global DNS= setting

Otherwise, queries may be passed to unexpected DNS servers.

(cherry picked from commit 5063f027ef669a934133465b875fd68f0b4d6794)
(cherry picked from commit a1ea2159afd3f2c0cdd1f9edad8cbee9fffe1abe)
(cherry picked from commit 6ad5e86ff1637240b794203a7d3a7e68e2d492e7)
This commit is contained in:
Yu Watanabe 2023-06-16 09:29:46 +09:00 committed by Luca Boccassi
parent fa83835f2c
commit 67dd5ffe3d

View File

@ -640,7 +640,7 @@ class DnsmasqClientTest(ClientTestBase, unittest.TestCase):
conf = '/run/systemd/resolved.conf.d/test-enable-dnssec.conf'
os.makedirs(os.path.dirname(conf), exist_ok=True)
with open(conf, 'w') as f:
f.write('[Resolve]\nDNSSEC=allow-downgrade\nLLMNR=no\nMulticastDNS=no\nDNSOverTLS=no\n')
f.write('[Resolve]\nDNSSEC=allow-downgrade\nLLMNR=no\nMulticastDNS=no\nDNSOverTLS=no\nDNS=\n')
self.addCleanup(os.remove, conf)
# create interface for generic connections; this will map all DNS names
@ -733,7 +733,7 @@ DNSSECNegativeTrustAnchors=company lab
conf = '/run/systemd/resolved.conf.d/test-enable-dnssec.conf'
os.makedirs(os.path.dirname(conf), exist_ok=True)
with open(conf, 'w') as f:
f.write('[Resolve]\nDNSSEC=allow-downgrade\nLLMNR=no\nMulticastDNS=no\nDNSOverTLS=no\n')
f.write('[Resolve]\nDNSSEC=allow-downgrade\nLLMNR=no\nMulticastDNS=no\nDNSOverTLS=no\nDNS=\n')
self.addCleanup(os.remove, conf)
# Add example.com to NTA list for this test