libknot/packet: compression algorithm improved
Compare changes
Files
6+ 1
− 21
@@ -22,26 +22,6 @@
@@ -96,7 +76,7 @@ int knot_compr_put_dname(const knot_dname_t *dname, uint8_t *dst, uint16_t max,
Self sign-up has been disabled due to increased spam activity. If you want to get access, please send an email to a project owner (preferred) or at gitlab(at)nic(dot)cz. We apologize for the inconvenience.
The previous compression algorithm does not compress everything it can in cases where there are domain names in the data section of a RR, e.g. when the answer contains
bar.example.com CNAME foo.example.com foo.example.com A 192.0.0.2
and foo.example.com was not encountered previously, then the second RR leaves the 'foo' part uncompressed.
The improvement resolves some of these cases by comparing the owner of a new RRset to be written with the last written dname instead of QNAME. Also, the effectivity was slightly increased according to benchmarks.