]> 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)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 13 Feb 2024 08:47:33 +0000 (09:47 +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 e9436927a92041365b155fdecedd15206a77d26a..7ee1d1aa37a035259659aaaf65a218b341306671 100644 (file)
@@ -1707,7 +1707,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;
        }