]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: fix invalid captive portal URL with dnsmasq 2.92 (#40011)
authorLuca Boccassi <bluca@debian.org>
Sun, 7 Dec 2025 00:43:47 +0000 (00:43 +0000)
committerGitHub <noreply@github.com>
Sun, 7 Dec 2025 00:43:47 +0000 (09:43 +0900)
dnsmasq 2.92 started converting binary content to ascii so the previous
invalid URL is no longer invalid as it's escaped.

So the test started failing: https://bugs.debian.org/1122015

Use a '|' character instead, which is not a valid URL character but it's
also not escaped by dnsmasq.

Follow-up for 1219391c9fa74568e4c60ee6b495e74887ab448f

test/test-network/systemd-networkd-tests.py

index beaefbdc8957259f30169ed9875017a2e29f22d5..67d7ccbb622530b3bc3b0c3df192e0cd10bd7ee4 100755 (executable)
@@ -8630,8 +8630,8 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         start_networkd()
         self.wait_online('veth-peer:carrier')
         masq = lambda bs: ':'.join(f'{b:02x}' for b in bs)
-        start_dnsmasq('--dhcp-option=114,' + masq(b'http://\x00invalid/url'),
-                      '--dhcp-option=option6:103,' + masq(b'http://\x00/invalid/url'))
+        start_dnsmasq('--dhcp-option=114,http://|invalid/url',
+                      '--dhcp-option=option6:103,http://|invalid/url')
 
         check(self, True, True)
         check(self, True, False)