]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/resolve kr_request_set_extended_error(): tweak priorities
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 1 Jan 2024 15:05:46 +0000 (16:05 +0100)
committerJakub Ružička <jakub.ruzicka@nic.cz>
Fri, 23 Feb 2024 12:04:52 +0000 (13:04 +0100)
Keep the first error in case priorities are equal.

At least with the current KeyTrap topic that should work better,
but blaming a single error is alchemy anyway, at least in some cases.

lib/resolve.c

index aa3d52153085f6548461be3c7f21b29bb947cf5c..9e82e6f06cd1dff8ea37432c29a2bec2df1844c8 100644 (file)
@@ -1684,7 +1684,7 @@ int kr_request_set_extended_error(struct kr_request *request, int info_code, con
                return KNOT_EDNS_EDE_NONE;
        }
 
-       if (ede_priority(info_code) >= ede_priority(ede->info_code)) {
+       if (ede_priority(info_code) > ede_priority(ede->info_code)) {
                ede->info_code = info_code;
                ede->extra_text = extra_text;
        }