Merge branch '4704-svcb-https-bind9-and-dig-fail-to-parse-packet-if-zero-svcpriority-and-existing-svcparams' into 'main'

Resolve "SVCB/HTTPS: Bind9 and Dig fail to parse packet if zero SvcPriority and existing SvcParams"

Closes #4704

See merge request isc-projects/bind9!9000
This commit is contained in:
Mark Andrews 2024-05-07 02:07:21 +00:00
commit 12ae798bc7
3 changed files with 7 additions and 13 deletions

View file

@ -1,3 +1,6 @@
6385. [func] Relax SVCB alias mode checks to allow parameters.
[GL #4704]
6384. [bug] Remove infinite loop when including a directory in a
zone file. [GL #4357]

View file

@ -616,10 +616,6 @@ generic_fromtext_in_svcb(ARGS_FROMTEXT) {
warn_badname(&name, lexer, callbacks);
}
if (alias) {
return (ISC_R_SUCCESS);
}
/*
* SvcParams
*/
@ -799,7 +795,7 @@ static isc_result_t
generic_fromwire_in_svcb(ARGS_FROMWIRE) {
dns_name_t name;
isc_region_t region, man = { .base = NULL, .length = 0 };
bool alias, first = true, have_alpn = false;
bool first = true, have_alpn = false;
uint16_t lastkey = 0, mankey = 0;
UNUSED(type);
@ -817,7 +813,6 @@ generic_fromwire_in_svcb(ARGS_FROMWIRE) {
return (ISC_R_UNEXPECTEDEND);
}
RETERR(mem_tobuffer(target, region.base, 2));
alias = uint16_fromregion(&region) == 0;
isc_buffer_forward(source, 2);
/*
@ -825,10 +820,6 @@ generic_fromwire_in_svcb(ARGS_FROMWIRE) {
*/
RETERR(dns_name_fromwire(&name, source, dctx, target));
if (alias) {
return (ISC_R_SUCCESS);
}
/*
* SvcParams.
*/

View file

@ -2563,8 +2563,8 @@ ISC_RUN_TEST_IMPL(https_svcb) {
TEXT_INVALID("0"),
/* minimal record */
TEXT_VALID_LOOP(0, "0 ."),
/* Alias form requires SvcFieldValue to be empty */
TEXT_INVALID("0 . alpn=\"h2\""),
/* Alias form possible future extension */
TEXT_VALID_LOOP(1, "0 . alpn=\"h2\""),
/* no "key" prefix */
TEXT_INVALID("2 svc.example.net. 0=\"2222\""),
/* no key value */
@ -2684,7 +2684,7 @@ ISC_RUN_TEST_IMPL(https_svcb) {
*/
WIRE_VALID(0x00, 0x00, 0x00),
/*
* Alias with non-empty SvcFieldValue (key7="").
* Alias with invalid dohpath.
*/
WIRE_INVALID(0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00),
/*