From: Yu Watanabe Date: Thu, 15 Jun 2023 20:55:58 +0000 (+0900) Subject: networkd-test.py: do not query IPv6 address X-Git-Tag: v254-rc1~188^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=55f9d72a5daa3d6f707878c0a50f856543c7de27;p=thirdparty%2Fsystemd.git networkd-test.py: do not query IPv6 address From changelog of dnsmasq v2.87: ==== Note in manpage the change in behaviour of -address. This behaviour actually changed in v2.86, but was undocumented there. From 2.86 on, (eg) --address=/example.com/1.2.3.4 ONLY applies to A queries. All other types of query will be sent upstream. Pre 2.86, that would catch the whole example.com domain and queries for other types would get a local NODATA answer. The pre-2.86 behaviour is still available, by configuring --address=/example.com/1.2.3.4 --local=/example.com/ ==== --- diff --git a/test/networkd-test.py b/test/networkd-test.py index 0e2073ead4a..af23f75741b 100755 --- a/test/networkd-test.py +++ b/test/networkd-test.py @@ -694,13 +694,13 @@ DNSSECNegativeTrustAnchors=company lab try: # test vpnclient specific domains; these should *not* be answered by # the general DNS - out = subprocess.check_output(['resolvectl', 'query', 'math.lab']) + out = subprocess.check_output(['resolvectl', 'query', '-4', 'math.lab']) self.assertIn(b'math.lab: 10.241.3.3', out) - out = subprocess.check_output(['resolvectl', 'query', 'kettle.cantina.company']) + out = subprocess.check_output(['resolvectl', 'query', '-4', 'kettle.cantina.company']) self.assertIn(b'kettle.cantina.company: 10.241.4.4', out) # test general domains - out = subprocess.check_output(['resolvectl', 'query', 'search.example.com']) + out = subprocess.check_output(['resolvectl', 'query', '-4', 'search.example.com']) self.assertIn(b'search.example.com: 192.168.42.1', out) with open(self.dnsmasq_log) as f: