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/
====
This commit is contained in:
Yu Watanabe 2023-06-16 05:55:58 +09:00
parent 77725adedd
commit 55f9d72a5d

View file

@ -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: