From ad87774223be657ca420946b3689ce70e8fae64e Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Mon, 28 Sep 2020 15:56:04 +0200 Subject: [PATCH] dnsrecords: fix APL test on macOS 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pdns/test-dnsrecords_cc.cc b/pdns/test-dnsrecords_cc.cc index a17738253a..4703c4df4c 100644 --- a/pdns/test-dnsrecords_cc.cc +++ b/pdns/test-dnsrecords_cc.cc @@ -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")) -- 2.47.2