resolve: place RRSIG after the corresponding entries#23289
resolve: place RRSIG after the corresponding entries#23289keszybz merged 6 commits intosystemd:mainfrom
Conversation
|
cc @pemensik and @mrc0mmand. |
0ba81d6 to
986201c
Compare
When `exist->rr` and `rr` point to the same object, then it may be freed by the `dns_resource_record_unref()`.
Previously, we manage DnsAnswerItem by an array and Set, The array was used for the order of the items, and the set is used to dedup items. Let's use OrderedSet, then we can simplify the logic. This fixes dns_answer_remove_by_key() and dns_answer_remove_by_rr() which makes the set in a broken state.
986201c to
d1b8e56
Compare
|
After adding the patches to #23104 it still complains: Without resolved: With resolved: And the only difference, so far, seems to be that resolved doesn't return RRSIG for root zone DNSKEY RR? Without resolved: With resolved: |
|
Do you test DNSSEC=yes configuration on resolved? DNSSEC=no is know to strip all RRSIG records away. |
This is with |
|
Not sure, but maybe, the issue is caused by the line here? # Create a trust anchor for resolved with our root zone
keymgr . dnskey | sed 's/ DNSKEY/ IN DNSKEY/g' >/etc/dnssec-trust-anchors.d/root.positiveYou can easily confirm the original issue #22002 is fixed by this PR: |
| dns_resource_record_ref(rr); | ||
| dns_resource_record_unref(exist->rr); | ||
| exist->rr = dns_resource_record_ref(rr); /* lgtm [cpp/inconsistent-null-check] */ | ||
| exist->rr = rr; |
There was a problem hiding this comment.
This reminds me of the helper I added in json.c to ref-and-replace-and-unref. We should add a similar one here, but let's do that later.
| if (n > UINT16_MAX - m) | ||
| n = UINT16_MAX; | ||
| else | ||
| n += m; |
There was a problem hiding this comment.
We should add a helper for this, something like saturate_add, but this can be done later.
|
Thanks! Will this be part of v251? |
|
yes |
|
Uhm, it seems that this hasn't fixed the issue after all... Or is it still broken just for me? |
Fixes #22002.