mirror of
https://github.com/isc-projects/bind9.git
synced 2026-07-16 16:42:52 -04:00
Extract non absolute name from source
The entire source region needs to be consumed for this usage.
This commit is contained in:
parent
7d7fc8cb2d
commit
7a13fcd601
1 changed files with 13 additions and 0 deletions
|
|
@ -489,6 +489,19 @@ ISC_RUN_TEST_IMPL(fromregion) {
|
|||
assert_int_equal(9, name.length);
|
||||
assert_ptr_equal(source, name.ndata);
|
||||
assert_true(dns_name_isabsolute(&name));
|
||||
|
||||
/*
|
||||
* Extract the partially qualified name in 'source' into 'name'
|
||||
* where 'name.ndata' points to the source.
|
||||
*/
|
||||
isc_buffer_init(&b, target, sizeof(target));
|
||||
dns_name_init(&name, NULL);
|
||||
r.base = source;
|
||||
r.length = 8;
|
||||
dns_name_fromregion(&name, &r);
|
||||
assert_int_equal(8, name.length);
|
||||
assert_ptr_equal(source, name.ndata);
|
||||
assert_false(dns_name_isabsolute(&name));
|
||||
}
|
||||
|
||||
/* is trust-anchor-telemetry test */
|
||||
|
|
|
|||
Loading…
Reference in a new issue