48 lines
1.5 KiB
Diff
48 lines
1.5 KiB
Diff
# HG changeset patch
|
|
# User Valentin Gosu <valentin.gosu@gmail.com>
|
|
# Date 1604497736 0
|
|
# Wed Nov 04 13:48:56 2020 +0000
|
|
# Node ID b18b9e52050cb671b57c011daa4a173fe46aec5a
|
|
# Parent 179e399ac08119ef3da61766c73f265679a6cf51
|
|
Bug 1672528 - Test r=necko-reviewers,dragana
|
|
|
|
Depends on D95414
|
|
|
|
Differential Revision: https://phabricator.services.mozilla.com/D95415
|
|
|
|
diff -r 179e399ac081 -r b18b9e52050c netwerk/test/unit/test_trr.js
|
|
--- a/netwerk/test/unit/test_trr.js Wed Nov 04 13:48:54 2020 +0000
|
|
+++ b/netwerk/test/unit/test_trr.js Wed Nov 04 13:48:56 2020 +0000
|
|
@@ -556,6 +556,19 @@
|
|
!Components.isSuccessCode(inStatus),
|
|
`${inStatus} should be an error code`
|
|
);
|
|
+ Services.prefs.setCharPref(
|
|
+ "network.trr.uri",
|
|
+ `https://foo.example.com:${h2Port}/doh?responseIP=::ffff:192.168.0.1`
|
|
+ );
|
|
+ [, , inStatus] = await new DNSListener(
|
|
+ "rfc1918-ipv6.example.com",
|
|
+ undefined,
|
|
+ false
|
|
+ );
|
|
+ Assert.ok(
|
|
+ !Components.isSuccessCode(inStatus),
|
|
+ `${inStatus} should be an error code`
|
|
+ );
|
|
});
|
|
|
|
// verify RFC1918 address from the server is fine when told so
|
|
@@ -568,6 +581,11 @@
|
|
);
|
|
Services.prefs.setBoolPref("network.trr.allow-rfc1918", true);
|
|
await new DNSListener("rfc1918.example.com", "192.168.0.1");
|
|
+ Services.prefs.setCharPref(
|
|
+ "network.trr.uri",
|
|
+ `https://foo.example.com:${h2Port}/doh?responseIP=::ffff:192.168.0.1`
|
|
+ );
|
|
+ await new DNSListener("rfc1918-ipv6.example.com", "::ffff:192.168.0.1");
|
|
});
|
|
|
|
// use GET and disable ECS (makes a larger request)
|