From: Pieter Lexis Date: Fri, 20 Nov 2020 10:50:33 +0000 (+0100) Subject: Test IPv4-mapped-IPv6 in the RecordTextReader X-Git-Tag: auth-4.5.0-alpha0~2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F9753%2Fhead;p=thirdparty%2Fpdns.git Test IPv4-mapped-IPv6 in the RecordTextReader --- diff --git a/pdns/test-rcpgenerator_cc.cc b/pdns/test-rcpgenerator_cc.cc index dd0b71aa19..7a84262802 100644 --- a/pdns/test-rcpgenerator_cc.cc +++ b/pdns/test-rcpgenerator_cc.cc @@ -26,8 +26,11 @@ BOOST_AUTO_TEST_CASE(test_xfrIP6) { rtr2.xfrIP6(rawIPv6); string ip6("\x2a\x01\x04\xf8\x0d\x12\x18\x80\x00\x00\x00\x00\x00\x00\x00\x05", 16); BOOST_CHECK_EQUAL(makeHexDump(rawIPv6), makeHexDump(ip6)); - - + + RecordTextReader rtr3("::FFFF:192.0.2.0"); + rtr3.xfrIP6(rawIPv6); + string ip62("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xc0\x00\x02\x00", 16); + BOOST_CHECK_EQUAL(makeHexDump(rawIPv6), makeHexDump(ip62)); } BOOST_AUTO_TEST_CASE(test_xfrSvcParamKeyVals_alpn) {