On Fri, 10 Jan 2025 09:39:09 +0100 Enrique Llorente Pastora <ellorent(a)redhat.com> wrote:On Thu, Jan 9, 2025 at 2:34 PM Stefano Brivio <sbrivio(a)redhat.com> wrote:Right, but doesn't that need to point to where we want to write anyway? That will be after the header, so it's good that it's past the header. Again, I didn't try this. -- StefanoOn Thu, 9 Jan 2025 13:57:38 +0100 Enrique Llorente Pastora <ellorent(a)redhat.com> wrote:I cannot use offset since it's initialize with + header offset += sizeof(struct opt_hdr);Also I have to move the list buffer or I will be storing it at the first element. encoded_name_len = encode_domain_name(srch->list + srch->hdr.l, NS_MAXDNAME, c->dns_search[i].n, name_len);Oh, right. I didn't test this. Can't you just follow along where you are with 'offset'? I'm not sure, I didn't look into it.