]> git.ipfire.org Git - thirdparty/bind9.git/commit
detect dup EDE with bitmap and store next pos
authorColin Vidal <colin@isc.org>
Wed, 29 Jan 2025 22:27:34 +0000 (23:27 +0100)
committerColin Vidal <colin@isc.org>
Thu, 30 Jan 2025 12:37:55 +0000 (12:37 +0000)
commite5fc9f5fcbd7f3d0dae8468bec1b801d5a692dba
treefd2982a26e2dcf8e3e2ab9004e7c9043c0472943
parentf390108f8cc04ac6ea49faa6deda169b1ed3c9b9
detect dup EDE with bitmap and store next pos

In order to avoid to loop to find the next position to store an EDE in
a dns_edectx_t, add a "nextede" state which holds the next available
position.

Also, in order ot avoid to loop to find if an EDE is already existing in
a dns_edectx_t, and avoid a duplicate, use a bitmap to immediately know
if the EDE is there or not.

Those both changes applies for adding or copying EDE.

Also make the direction of dns_ede_copy more explicit/avoid errors by
making "edectx_from" a const pointer.

(cherry picked from commit 9021f9d802296241dc69431407551d824beeb814)
lib/dns/ede.c
lib/dns/include/dns/ede.h