]> git.ipfire.org Git - thirdparty/bind9.git/commit
Use hashtable when parsing a message
authorOndřej Surý <ondrej@isc.org>
Mon, 11 Sep 2023 08:35:28 +0000 (10:35 +0200)
committerMichał Kępień <michal@isc.org>
Fri, 5 Jan 2024 10:50:23 +0000 (11:50 +0100)
commit849c05adf43870ddcdc816ee7f6159e06e843d21
tree4a9dfaf2e777bd2d8eb4b40f2db7d27b8c9021ca
parent346b26823cf8cc9eb8979c80d47b8f2d3a88e080
Use hashtable when parsing a message

When parsing messages use a hashtable instead of a linear search to
reduce the amount of work done in findname when there's more than one
name in the section.

There are two hashtables:

1) hashtable for owner names - that's constructed for each section when
we hit the second name in the section and destroyed right after parsing
that section;

2) per-name hashtable - for each name in the section, we construct a new
hashtable for that name if there are more than one rdataset for that
particular name.

(cherry picked from commit b8a96317544c7b310b4f74360825a87b6402ddc2)
lib/dns/include/dns/message.h
lib/dns/include/dns/name.h
lib/dns/message.c
lib/dns/name.c