]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd-test.py: do not query IPv6 address
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 15 Jun 2023 20:55:58 +0000 (05:55 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 16 Jun 2023 01:44:16 +0000 (10:44 +0900)
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/
====

test/networkd-test.py

index 0e2073ead4a9ca50b50eaec72fcbb6a8191a7571..af23f75741b1070c003b1935f23e3a5126366fab 100755 (executable)
@@ -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: