Commit 67c65564 authored by Daniel Salzman's avatar Daniel Salzman

Merge branch 'use-rr-direct' into 'master'

Use knot_rdata_t directly instead of via knot_rrset_t
parents 0e5a1b76 eb2a6a5e
......@@ -849,8 +849,9 @@ int remote_print_txt(const knot_rrset_t *rr, uint16_t i)
/* Packet parser should have already checked the packet validity. */
char buf[256];
uint16_t parsed = 0;
uint16_t rlen = knot_rrset_rr_size(rr, i);
uint8_t *p = knot_rrset_rr_rdata(rr, i);
const knot_rdata_t *rdata = knot_rdataset_at(&rr->rrs, i);
uint8_t *p = knot_rdata_data(rdata);
uint16_t rlen = knot_rdata_rdlen(rdata);
while (parsed < rlen) {
memcpy(buf, (const char*)(p+1), *p);
buf[*p] = '\0';
......
......@@ -698,8 +698,9 @@ static bool dnskey_exists_in_zone(const knot_rrset_t *dnskeys,
uint16_t dnskeys_rdata_count = dnskeys->rrs.rr_count;
for (uint16_t i = 0; i < dnskeys_rdata_count; i++) {
uint8_t *rdata = knot_rrset_rr_rdata(dnskeys, i);
uint16_t rdata_size = knot_rrset_rr_size(dnskeys, i);
const knot_rdata_t *rr_data = knot_rdataset_at(&dnskeys->rrs, i);
uint8_t *rdata = knot_rdata_data(rr_data);
uint16_t rdata_size = knot_rdata_rdlen(rr_data);
if (dnskey_rdata_match(key, rdata, rdata_size)) {
return true;
}
......@@ -750,7 +751,9 @@ static int remove_invalid_dnskeys(const knot_rrset_t *soa,
knot_rrset_t *to_remove = NULL;
int result = KNOT_EOK;
if (knot_rrset_rr_ttl(dnskeys, 0) != knot_rrset_rr_ttl(soa, 0)) {
const knot_rdata_t *dnskeys_data = knot_rdataset_at(&dnskeys->rrs, 0);
const knot_rdata_t *soa_data = knot_rdataset_at(&soa->rrs, 0);
if (knot_rdata_ttl(dnskeys_data) != knot_rdata_ttl(soa_data)) {
dbg_dnssec_detail("removing DNSKEYs (SOA TTL differs)\n");
to_remove = knot_rrset_copy(dnskeys, NULL);
result = to_remove ? KNOT_EOK : KNOT_ENOMEM;
......@@ -759,8 +762,8 @@ static int remove_invalid_dnskeys(const knot_rrset_t *soa,
uint16_t dnskeys_rdata_count = dnskeys->rrs.rr_count;
for (uint16_t i = 0; i < dnskeys_rdata_count; i++) {
uint8_t *rdata = knot_rrset_rr_rdata(dnskeys, i);
uint16_t rdata_size = knot_rrset_rr_size(dnskeys, i);
uint8_t *rdata = knot_rdata_data(dnskeys_data);
uint16_t rdata_size = knot_rdata_rdlen(dnskeys_data);
uint16_t keytag = knot_keytag(rdata, rdata_size);
const knot_zone_key_t *key = knot_get_zone_key(zone_keys, keytag);
if (key == NULL) {
......@@ -846,8 +849,10 @@ static int add_missing_dnskeys(const knot_rrset_t *soa,
knot_rrset_t *to_add = NULL;
int result = KNOT_EOK;
const knot_rdata_t *dnskeys_data = knot_rdataset_at(&dnskeys->rrs, 0);
const knot_rdata_t *soa_data = knot_rdataset_at(&soa->rrs, 0);
bool add_all = (knot_rrset_empty(dnskeys) ||
knot_rrset_rr_ttl(dnskeys, 0) != knot_rrset_rr_ttl(soa, 0));
knot_rdata_ttl(dnskeys_data) != knot_rdata_ttl(soa_data));
for (int i = 0; i < zone_keys->count; i++) {
const knot_zone_key_t *key = &zone_keys->keys[i];
......@@ -870,8 +875,7 @@ static int add_missing_dnskeys(const knot_rrset_t *soa,
}
}
result = rrset_add_zone_key(to_add, key,
knot_rrset_rr_ttl(soa, 0));
result = rrset_add_zone_key(to_add, key, knot_rdata_ttl(soa_data));
if (result != KNOT_EOK) {
break;
}
......@@ -923,8 +927,9 @@ static int update_dnskeys_rrsigs(const knot_rrset_t *dnskeys,
// add unknown keys from zone
uint16_t dnskeys_rdata_count = dnskeys->rrs.rr_count;
for (uint16_t i = 0; i < dnskeys_rdata_count; i++) {
uint8_t *rdata = knot_rrset_rr_rdata(dnskeys, i);
uint16_t rdata_size = knot_rrset_rr_size(dnskeys, i);
const knot_rdata_t *rr_data = knot_rdataset_at(&dnskeys->rrs, i);
uint8_t *rdata = knot_rdata_data(rr_data);
uint16_t rdata_size = knot_rdata_rdlen(rr_data);
uint16_t keytag = knot_keytag(rdata, rdata_size);
if (knot_get_zone_key(zone_keys, keytag) != NULL) {
continue;
......@@ -944,8 +949,9 @@ static int update_dnskeys_rrsigs(const knot_rrset_t *dnskeys,
continue;
}
const knot_rdata_t *soa_data = knot_rdataset_at(&soa->rrs, 0);
result = rrset_add_zone_key(new_dnskeys, key,
knot_rrset_rr_ttl(soa, 0));
knot_rdata_ttl(soa_data));
if (result != KNOT_EOK) {
goto fail;
}
......
......@@ -90,8 +90,9 @@ static int dname_cname_synth(const knot_rrset_t *dname_rr,
memcpy(cname_rdata, cname, cname_size);
knot_dname_free(&cname, NULL);
const knot_rdata_t *dname_data = knot_rdataset_at(&dname_rr->rrs, 0);
int ret = knot_rrset_add_rdata(cname_rrset, cname_rdata, cname_size,
knot_rrset_rr_ttl(dname_rr, 0), mm);
knot_rdata_ttl(dname_data), mm);
if (ret != KNOT_EOK) {
knot_dname_free(&owner_copy, mm);
return ret;
......@@ -255,7 +256,8 @@ static int put_authority_soa(knot_pkt_t *pkt, struct query_data *qdata,
int ret = KNOT_EOK;
uint32_t flags = KNOT_PF_NOTRUNC;
uint32_t min = knot_soa_minimum(&soa_rrset.rrs);
if (min < knot_rrset_rr_ttl(&soa_rrset, 0)) {
const knot_rdata_t *soa_data = knot_rdataset_at(&soa_rrset.rrs, 0);
if (min < knot_rdata_ttl(soa_data)) {
knot_rrset_t copy;
knot_dname_t *dname_cpy = knot_dname_copy(soa_rrset.owner, &pkt->mm);
if (dname_cpy == NULL) {
......@@ -267,7 +269,8 @@ static int put_authority_soa(knot_pkt_t *pkt, struct query_data *qdata,
knot_dname_free(&dname_cpy, &pkt->mm);
return ret;
}
knot_rrset_rr_set_ttl(&copy, 0, min);
knot_rdata_t *copy_data = knot_rdataset_at(&copy.rrs, 0);
knot_rdata_set_ttl(copy_data, min);
flags |= KNOT_PF_FREE;
soa_rrset = copy;
......
......@@ -199,7 +199,8 @@ static bool rrset_empty(const knot_rrset_t *rrset)
return true;
}
if (rr_count == 1) {
return knot_rrset_rr_size(rrset, 0) == 0;
const knot_rdata_t *rr = knot_rdataset_at(&rrset->rrs, 0);
return knot_rdata_rdlen(rr) == 0;
}
return false;
}
......@@ -209,7 +210,7 @@ static int process_prereq(const knot_rrset_t *rrset, uint16_t qclass,
const knot_zone_contents_t *zone, uint16_t *rcode,
list_t *rrset_list)
{
if (knot_rrset_rr_ttl(rrset, 0) != 0) {
if (knot_rdata_ttl(knot_rdataset_at(&rrset->rrs, 0)) != 0) {
return KNOT_EMALF;
}
......@@ -670,9 +671,12 @@ static int process_add_normal(const zone_node_t *node,
* RR in the node's RRSet. If not, refuse the UPDATE.
*/
knot_rrset_t rr_in_zone = node_rrset(node, rr->type);
if (node_rrtype_exists(node, rr->type) &&
knot_rrset_rr_ttl(rr, 0) != knot_rrset_rr_ttl(&rr_in_zone, 0)) {
return KNOT_ETTL;
if (node_rrtype_exists(node, rr->type)) {
const knot_rdata_t *add_data = knot_rdataset_at(&rr->rrs, 0);
const knot_rdata_t *zone_data = knot_rdataset_at(&rr_in_zone.rrs, 0);
if (knot_rdata_ttl(add_data) != knot_rdata_ttl(zone_data)) {
return KNOT_ETTL;
}
}
const bool apex_ns = node_rrtype_exists(node, KNOT_RRTYPE_SOA) &&
......@@ -889,7 +893,7 @@ static int check_update(const knot_rrset_t *rrset, const knot_pkt_t *query,
return KNOT_EMALF;
}
} else if (rrset->rclass == KNOT_CLASS_NONE) {
if (knot_rrset_rr_ttl(rrset, 0) != 0
if (knot_rdata_ttl(knot_rdataset_at(&rrset->rrs, 0)) != 0
|| knot_rrtype_is_metatype(rrset->type)) {
*rcode = KNOT_RCODE_FORMERR;
return KNOT_EMALF;
......@@ -927,7 +931,7 @@ static uint16_t ret_to_rcode(int ret)
{
if (ret == KNOT_EMALF) {
return KNOT_RCODE_FORMERR;
} else if (ret == KNOT_EDENIED) {
} else if (ret == KNOT_EDENIED || ret == KNOT_ETTL) {
return KNOT_RCODE_REFUSED;
} else {
return KNOT_RCODE_SERVFAIL;
......
......@@ -70,11 +70,11 @@ static int add_rrset_no_merge(zone_node_t *node, const knot_rrset_t *rrset)
/*! \brief Checks if the added RR has the same TTL as the first RR in the node. */
static bool ttl_error(struct rr_data *node_data, const knot_rrset_t *rrset)
{
if (rrset->type == KNOT_RRTYPE_RRSIG) {
if (rrset->type == KNOT_RRTYPE_RRSIG || node_data->rrs.rr_count == 0) {
return false;
}
const uint32_t inserted_ttl = knot_rrset_rr_ttl(rrset, 0);
const uint32_t inserted_ttl = knot_rdata_ttl(knot_rdataset_at(&rrset->rrs, 0));
// Get first RR from node.
const knot_rdata_t *node_rdata = knot_rdataset_at(&node_data->rrs, 0);
const uint32_t node_ttl = knot_rdata_ttl(node_rdata);
......
......@@ -264,9 +264,8 @@ static int check_dnskey_rdata(const knot_rrset_t *rrset, size_t rdata_pos)
/* check that Zone key bit it set - position 7 in net order */
const uint16_t mask = 1 << 8; //0b0000000100000000;
uint16_t flags =
knot_wire_read_u16(knot_rrset_rr_rdata(rrset, rdata_pos));
const knot_rdata_t *rr_data = knot_rdataset_at(&rrset->rrs, rdata_pos);
uint16_t flags = knot_wire_read_u16(knot_rdata_data(rr_data));
if (flags & mask) {
return KNOT_EOK;
} else {
......@@ -334,7 +333,7 @@ static int check_rrsig_rdata(err_handler_t *handler,
uint16_t rr_count = rrset->rrs.rr_count;
for (uint16_t i = 0; i < rr_count; ++i) {
if (original_ttl != knot_rrset_rr_ttl(rrset, i)) {
if (original_ttl != knot_rdata_ttl(knot_rdataset_at(&rrset->rrs, i))) {
err_handler_handle_error(handler, node,
ZC_ERR_RRSIG_RDATA_TTL,
info_str);
......@@ -382,9 +381,9 @@ static int check_rrsig_rdata(err_handler_t *handler,
}
/* Calculate keytag. */
const knot_rdata_t *rr_data = knot_rdataset_at(&dnskey_rrset->rrs, i);
uint16_t dnskey_key_tag =
knot_keytag(knot_rrset_rr_rdata(dnskey_rrset, i),
knot_rrset_rr_size(dnskey_rrset, i));
knot_keytag(knot_rdata_data(rr_data), knot_rdata_rdlen(rr_data));
if (key_tag_rrsig != dnskey_key_tag) {
continue;
}
......@@ -462,7 +461,7 @@ static int check_rrsig_in_rrset(err_handler_t *handler,
}
const knot_rdata_t *sig_rr = knot_rdataset_at(&rrsigs, 0);
if (knot_rrset_rr_ttl(rrset, 0) != knot_rdata_ttl(sig_rr)) {
if (knot_rdata_ttl(knot_rdataset_at(&rrset->rrs, 0)) != knot_rdata_ttl(sig_rr)) {
err_handler_handle_error(handler, node,
ZC_ERR_RRSIG_TTL,
info_str);
......
......@@ -218,8 +218,9 @@ static int rrsigs_create_rdata(knot_rrset_t *rrsigs,
}
uint8_t result[size];
const knot_rdata_t *covered_data = knot_rdataset_at(&covered->rrs, 0);
int res = knot_rrsig_write_rdata(result, key, covered->type, owner_labels,
knot_rrset_rr_ttl(covered, 0),
knot_rdata_ttl(covered_data),
sig_incepted, sig_expires);
assert(res == KNOT_EOK);
......@@ -243,7 +244,7 @@ static int rrsigs_create_rdata(knot_rrset_t *rrsigs,
}
return knot_rrset_add_rdata(rrsigs, result, size,
knot_rrset_rr_ttl(covered, 0), NULL);
knot_rdata_ttl(covered_data), NULL);
}
/*!
......@@ -336,7 +337,8 @@ int knot_is_valid_signature(const knot_rrset_t *covered,
// identify fields in the signature being validated
uint8_t *rdata = knot_rrset_rr_rdata(rrsigs, pos);
const knot_rdata_t *rr_data = knot_rdataset_at(&rrsigs->rrs, pos);
uint8_t *rdata = knot_rdata_data(rr_data);
if (!rdata) {
return KNOT_EINVAL;
}
......
......@@ -74,7 +74,8 @@ static uint8_t *sig0_create_rdata(knot_rrset_t *rrset, knot_dnssec_key_t *key)
return NULL;
}
return knot_rrset_rr_rdata(rrset, 0);
const knot_rdata_t *rr = knot_rdataset_at(&rrset->rrs, 0);
return knot_rdata_data(rr);
}
/*!
......
......@@ -69,8 +69,7 @@ int knot_edns_new_from_rr(knot_opt_rr_t *opt_rr, const knot_rrset_t *rrset)
// TTL has switched bytes
uint32_t ttl;
dbg_edns_detail("TTL: %u\n", knot_rrset_rr_ttl(rrset, 0));
knot_wire_write_u32((uint8_t *)&ttl, knot_rrset_rr_ttl(rrset, 0));
knot_wire_write_u32((uint8_t *)&ttl, knot_rdata_ttl(knot_rdataset_at(&rrset->rrs, 0)));
// first byte of TTL is extended RCODE
dbg_edns_detail("TTL: %u\n", ttl);
memcpy(&opt_rr->ext_rcode, &ttl, 1);
......@@ -86,9 +85,10 @@ int knot_edns_new_from_rr(knot_opt_rr_t *opt_rr, const knot_rrset_t *rrset)
int rc = 0;
dbg_edns_verb("Parsing options.\n");
uint16_t size = knot_rrset_rr_size(rrset, 0);
const knot_rdata_t *rr_data = knot_rdataset_at(&rrset->rrs, 0);
uint16_t size = knot_rdata_rdlen(rr_data);
if (size > 0) {
uint8_t *raw = knot_rrset_rr_rdata(rrset, 0);
uint8_t *raw = knot_rdata_data(rr_data);
size_t pos = 0;
while (pos < size) {
// ensure there is enough data to parse the OPTION CODE
......
......@@ -57,14 +57,15 @@ typedef enum tsig_off_t {
*/
static uint8_t* tsig_rdata_seek(const knot_rrset_t *rr, tsig_off_t id, size_t nb)
{
uint8_t *rd = knot_rrset_rr_rdata(rr, 0);
const knot_rdata_t *rr_data = knot_rdataset_at(&rr->rrs, 0);
uint8_t *rd = knot_rdata_data(rr_data);
if (rd == NULL) {
return NULL;
}
/* TSIG RR names should be already sanitized on parse. */
int alg_len = knot_dname_size(rd);
uint16_t lim = knot_rrset_rr_size(rr, 0);
uint16_t lim = knot_rdata_rdlen(rr_data);
if (lim < alg_len + 5 * sizeof(uint16_t)) {
dbg_tsig("TSIG: rdata: not enough items "
"(has %"PRIu16", min %zu).\n",
......@@ -224,7 +225,8 @@ int tsig_rdata_set_other_data(knot_rrset_t *tsig, uint16_t len,
const knot_dname_t *tsig_rdata_alg_name(const knot_rrset_t *tsig)
{
return knot_rrset_rr_rdata(tsig, 0);
const knot_rdata_t *rr_data = knot_rdataset_at(&tsig->rrs, 0);
return knot_rdata_data(rr_data);
}
knot_tsig_algorithm_t tsig_rdata_alg(const knot_rrset_t *tsig)
......@@ -467,8 +469,9 @@ size_t tsig_wire_actsize(const knot_rrset_t *tsig)
int tsig_rdata_is_ok(const knot_rrset_t *tsig)
{
/*! \todo Check size, needs to check variable-length fields. */
const knot_rdata_t *rr_data = knot_rdataset_at(&tsig->rrs, 0);
return (tsig
&& knot_rrset_rr_rdata(tsig, 0) != NULL
&& knot_rdata_data(rr_data) != NULL
&& tsig_rdata_seek(tsig, TSIG_OTHER_O, 0) != NULL
&& tsig_rdata_alg_name(tsig) != NULL
&& tsig_rdata_time_signed(tsig) != 0);
......
......@@ -1792,8 +1792,9 @@ int knot_rrset_txt_dump_data(const knot_rrset_t *rrset,
return KNOT_EINVAL;
}
uint8_t *data = knot_rrset_rr_rdata(rrset, pos);
uint16_t data_len = knot_rrset_rr_size(rrset, pos);
const knot_rdata_t *rr_data = knot_rdataset_at(&rrset->rrs, pos);
uint8_t *data = knot_rdata_data(rr_data);
uint16_t data_len = knot_rdata_rdlen(rr_data);
int ret = 0;
......@@ -2009,8 +2010,8 @@ int knot_rrset_txt_dump(const knot_rrset_t *rrset,
uint16_t rr_count = rrset->rrs.rr_count;
for (uint16_t i = 0; i < rr_count; i++) {
// Dump rdata owner, class, ttl and type.
ret = knot_rrset_txt_dump_header(rrset,
knot_rrset_rr_ttl(rrset, i),
const knot_rdata_t *rr_data = knot_rdataset_at(&rrset->rrs, i);
ret = knot_rrset_txt_dump_header(rrset, knot_rdata_ttl(rr_data),
dst + len, maxlen - len, style);
if (ret < 0) {
return KNOT_ESPACE;
......
......@@ -41,7 +41,8 @@ static uint16_t rrset_rdata_naptr_bin_chunk_size(const knot_rrset_t *rrset,
}
size_t size = 0;
uint8_t *rdata = knot_rrset_rr_rdata(rrset, pos);
const knot_rdata_t *rr_data = knot_rdataset_at(&rrset->rrs, pos);
uint8_t *rdata = knot_rdata_data(rr_data);
assert(rdata);
/* Two shorts at the beginning. */
......@@ -60,10 +61,10 @@ static uint16_t rrset_rdata_naptr_bin_chunk_size(const knot_rrset_t *rrset,
}
static size_t rrset_rdata_remainder_size(const knot_rrset_t *rrset,
size_t offset, size_t pos)
uint16_t offset, size_t pos)
{
size_t ret = knot_rrset_rr_size(rrset, pos) - offset;
return ret;
const knot_rdata_t *rr_data = knot_rdataset_at(&rrset->rrs, pos);
return knot_rdata_rdlen(rr_data) - offset;
}
static int knot_rrset_header_to_wire(const knot_rrset_t *rrset, uint32_t ttl,
......@@ -148,7 +149,8 @@ static int knot_rrset_rdata_to_wire_one(const knot_rrset_t *rrset,
/* Put RR header to wire. */
size_t size = 0;
int ret = knot_rrset_header_to_wire(rrset, knot_rrset_rr_ttl(rrset, rdata_pos),
int ret = knot_rrset_header_to_wire(rrset,
knot_rdata_ttl(knot_rdataset_at(&rrset->rrs, rdata_pos)),
pos, max_size,
compr, &size);
if (ret != KNOT_EOK) {
......@@ -167,7 +169,8 @@ static int knot_rrset_rdata_to_wire_one(const knot_rrset_t *rrset,
}
/* Get pointer into RDATA array. */
uint8_t *rdata = knot_rrset_rr_rdata(rrset, rdata_pos);
const knot_rdata_t *rr_data = knot_rdataset_at(&rrset->rrs, rdata_pos);
uint8_t *rdata = knot_rdata_data(rr_data);
assert(rdata);
/* Offset into one RDATA array. */
size_t offset = 0;
......@@ -416,44 +419,6 @@ void knot_rrset_clear(knot_rrset_t *rrset, mm_ctx_t *mm)
}
}
uint8_t *knot_rrset_rr_rdata(const knot_rrset_t *rrset, size_t pos)
{
knot_rdata_t *rr = knot_rdataset_at(&rrset->rrs, pos);
if (rr) {
return knot_rdata_data(rr);
} else {
return NULL;
}
}
uint16_t knot_rrset_rr_size(const knot_rrset_t *rrset, size_t pos)
{
const knot_rdata_t *rr = knot_rdataset_at(&rrset->rrs, pos);
if (rr) {
return knot_rdata_rdlen(rr);
} else {
return 0;
}
}
uint32_t knot_rrset_rr_ttl(const knot_rrset_t *rrset, size_t pos)
{
const knot_rdata_t *rr = knot_rdataset_at(&rrset->rrs, pos);
if (rr) {
return knot_rdata_ttl(rr);
} else {
return 0;
}
}
void knot_rrset_rr_set_ttl(const knot_rrset_t *rrset, size_t pos, uint32_t ttl)
{
knot_rdata_t *rr = knot_rdataset_at(&rrset->rrs, pos);
if (rr) {
knot_rdata_set_ttl(rr, ttl);
}
}
int knot_rrset_to_wire(const knot_rrset_t *rrset, uint8_t *wire, size_t *size,
size_t max_size, uint16_t *rr_count, knot_compr_t *compr)
{
......
......@@ -125,48 +125,6 @@ void knot_rrset_free(knot_rrset_t **rrset, mm_ctx_t *mm);
*/
void knot_rrset_clear(knot_rrset_t *rrset, mm_ctx_t *mm);
/* ----------- Getters / Setters (legacy, functionality in rdata_t) ------------ */
/*!
* \brief Returns RDATA of RR on given position.
*
* \param rrset RRSet to get the RDATA from.
* \param pos Position of RR to get.
*
* \retval NULL if no RDATA on rdata_pos exist.
* \retval Pointer to RDATA on given position if successfull.
*/
uint8_t *knot_rrset_rr_rdata(const knot_rrset_t *rrset, size_t pos);
/*!
* \brief Returns size of an RR RDATA on a given position.
*
* \param rrset RRSet holding RR RDATA.
* \param pos RR position.
*
* \return Item size.
*/
uint16_t knot_rrset_rr_size(const knot_rrset_t *rrset, size_t pos);
/*!
* \brief Returns TTL of an RR on a given position.
*
* \param rrset RRSet holding RR RDATA.
* \param pos RR position.
*
* \return TTL.
*/
uint32_t knot_rrset_rr_ttl(const knot_rrset_t *rrset, size_t pos);
/*!
* \brief Sets TTL for RR on a given position.
*
* \param rrset RRSet containing RR.
* \param pos RR position.
* \param ttl TTL to be set.
*/
void knot_rrset_rr_set_ttl(const knot_rrset_t *rrset, size_t pos, uint32_t ttl);
/* ---------- Wire conversions (legacy, to be done in knot_pkt_t) ----------- */
/*!
......
......@@ -215,9 +215,7 @@ static int knot_tsig_write_tsig_variables(uint8_t *wire,
offset += sizeof(uint16_t);
/* Copy TTL - always 0. */
knot_wire_write_u32(wire + offset, knot_rrset_rr_ttl(tsig_rr, 0));
dbg_tsig_verb("TSIG: write variables: written TTL: %u - \n",
knot_rrset_rr_ttl(tsig_rr, 0));
knot_wire_write_u32(wire + offset, knot_rdata_ttl(knot_rdataset_at(&tsig_rr->rrs, 0)));
dbg_tsig_hex_detail((char *)(wire + offset), sizeof(uint32_t));
offset += sizeof(uint32_t);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment