From 2a50fc324bb67cae677f8bfb3705afd1ffac83bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Mon, 5 Mar 2018 14:13:50 +0100 Subject: [PATCH] Add a release note about dropping support for non-dotted-quad IPv4 addresses in master files Support for non-dotted-quad IPv4 addresses in master files was dropped when the inet_aton() call inside getquad() got replaced with a call to inet_pton(), so a release note should have been added back then to inform users that such syntax will no longer work. --- doc/arm/notes.xml | 6 ++++++ lib/dns/tests/rdata_test.c | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/doc/arm/notes.xml b/doc/arm/notes.xml index dae01a0442..599a29148b 100644 --- a/doc/arm/notes.xml +++ b/doc/arm/notes.xml @@ -88,6 +88,12 @@ been removed. [GL #93] + + + IPv4 addresses in forms other than dotted-quad are no longer + accepted in master files. [GL #13] [GL #56] + + diff --git a/lib/dns/tests/rdata_test.c b/lib/dns/tests/rdata_test.c index 02200a47f5..0a9b94b2d6 100644 --- a/lib/dns/tests/rdata_test.c +++ b/lib/dns/tests/rdata_test.c @@ -1137,6 +1137,20 @@ ATF_TC_HEAD(wks, tc) { atf_tc_set_md_var(tc, "descr", "WKS RDATA manipulations"); } ATF_TC_BODY(wks, tc) { + text_ok_t text_ok[] = { + /* + * Valid, IPv4 address in dotted-quad form. + */ + TEXT_VALID("127.0.0.1 6"), + /* + * Invalid, IPv4 address not in dotted-quad form. + */ + TEXT_INVALID("127.1 6"), + /* + * Sentinel. + */ + TEXT_SENTINEL() + }; wire_ok_t wire_ok[] = { /* * Too short. @@ -1162,7 +1176,7 @@ ATF_TC_BODY(wks, tc) { UNUSED(tc); - check_rdata(NULL, wire_ok, ISC_FALSE, dns_rdataclass_in, + check_rdata(text_ok, wire_ok, ISC_FALSE, dns_rdataclass_in, dns_rdatatype_wks, sizeof(dns_rdata_in_wks_t)); }