]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsrecords: fix APL test on macOS 9550/head
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 28 Sep 2020 13:56:04 +0000 (15:56 +0200)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 28 Sep 2020 14:44:25 +0000 (16:44 +0200)
macOS does not life fe80:: without an %interface specifier, so inet_pton
fails, and we end with an error like this:

check rec->getZoneRepresentation() == zoneval has failed [2:invalid Non-recoverable failure in name resolution/128 != 2:fe80:1234:5678:9910:8bc:3359:b2e8:720e/128]

Fix test by switching to a "normal" internet class prefix.

pdns/test-dnsrecords_cc.cc

index a17738253aaa51ed35956655fbc8cc6c4994adb8..4703c4df4c80969e0f9266abc3ef8746aec2f699 100644 (file)
@@ -143,10 +143,11 @@ BOOST_AUTO_TEST_CASE(test_record_types) {
      (CASE_S(QType::APL,"2:20::/16", "\x00\x02\x10\x02\x00\x20"))
      (CASE_S(QType::APL,"2:2000::/8", "\x00\x02\x08\x01\x20"))
      (CASE_S(QType::APL,"2:fe00::/8", "\x00\x02\x08\x01\xfe"))
-     (CASE_S(QType::APL,"2:fe80::/16", "\x00\x02\x10\x02\xfe\x80"))
+     (CASE_S(QType::APL,"2:2001:db8::/32", "\x00\x02\x20\x04\x20\x01\x0d\xb8"))
+     (CASE_S(QType::APL,"2:2001:db8::/30", "\x00\x02\x1e\x04\x20\x01\x0d\xb8"))
      (CASE_S(QType::APL,"2:2001::1/128", "\x00\x02\x80\x10\x20\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"))
      (CASE_S(QType::APL,"!2:2001::1/128", "\x00\x02\x80\x90\x20\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"))
-     (CASE_S(QType::APL,"2:fe80:1234:5678:9910:8bc:3359:b2e8:720e/128", "\x00\x02\x80\x10\xfe\x80\x12\x34\x56\x78\x99\x10\x08\xbc\x33\x59\xb2\xe8\x72\x0e"))
+     (CASE_S(QType::APL,"2:2001:db8:5678:9910:8bc:3359:b2e8:720e/128", "\x00\x02\x80\x10\x20\x01\x0d\xb8\x56\x78\x99\x10\x08\xbc\x33\x59\xb2\xe8\x72\x0e"))
      (CASE_S(QType::APL,"2:ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128","\x00\x02\x80\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"))
      (CASE_S(QType::APL,"", ""))
      (CASE_S(QType::APL,"1:10.0.0.0/32 1:10.1.1.1/32", "\x00\x01\x20\x01\x0a\x00\x01\x20\x04\x0a\x01\x01\x01"))