Blame SOURCES/0003-CACHE_REQ-Fix-hybrid-lookup-log-spamming.patch

de2e0a
From 49eb871847a94311bbd2190a315230e4bae1ea2c Mon Sep 17 00:00:00 2001
de2e0a
From: Justin Stephenson <jstephen@redhat.com>
de2e0a
Date: Mon, 1 Aug 2022 09:54:51 -0400
de2e0a
Subject: [PATCH] CACHE_REQ: Fix hybrid lookup log spamming
de2e0a
MIME-Version: 1.0
de2e0a
Content-Type: text/plain; charset=UTF-8
de2e0a
Content-Transfer-Encoding: 8bit
de2e0a
de2e0a
Skip calling cache_req_data_set_hybrid_lookup() when hybrid data
de2e0a
is NULL for certain NSS request types (e.g. Service by Name).
de2e0a
de2e0a
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
de2e0a
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
de2e0a
(cherry picked from commit 96a1dce8096d45e986ab01aaac11d8c77c36d1d7)
de2e0a
---
de2e0a
 src/responder/nss/nss_get_object.c | 4 +++-
de2e0a
 1 file changed, 3 insertions(+), 1 deletion(-)
de2e0a
de2e0a
diff --git a/src/responder/nss/nss_get_object.c b/src/responder/nss/nss_get_object.c
de2e0a
index 9762d6bfe..5a2e7e9bd 100644
de2e0a
--- a/src/responder/nss/nss_get_object.c
de2e0a
+++ b/src/responder/nss/nss_get_object.c
de2e0a
@@ -171,7 +171,9 @@ hybrid_domain_retry_data(TALLOC_CTX *mem_ctx,
de2e0a
                                           input_name);
de2e0a
     }
de2e0a
 
de2e0a
-    cache_req_data_set_hybrid_lookup(hybrid_data, true);
de2e0a
+    if (hybrid_data != NULL) {
de2e0a
+        cache_req_data_set_hybrid_lookup(hybrid_data, true);
de2e0a
+    }
de2e0a
 
de2e0a
     return hybrid_data;
de2e0a
 }
de2e0a
-- 
de2e0a
2.37.1
de2e0a