e07df0
From 908b71224037745db3d1420a37e99ee9cbb3b3b3 Mon Sep 17 00:00:00 2001
e07df0
From: Petr Mensik <pemensik@redhat.com>
e07df0
Date: Thu, 12 Dec 2019 16:05:25 +0100
e07df0
Subject: [PATCH] Terminate query if both setup_lookup and next_origin failed
e07df0
e07df0
That happens in case searched name plus search domain is too long and no
e07df0
shorted origin would follow.
e07df0
---
e07df0
 bin/dig/dighost.c | 4 ++++
e07df0
 1 file changed, 4 insertions(+)
e07df0
e07df0
diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c
e07df0
index 6302a98..ed9625e 100644
e07df0
--- a/bin/dig/dighost.c
e07df0
+++ b/bin/dig/dighost.c
e07df0
@@ -2053,6 +2053,10 @@ start_lookup(void) {
e07df0
 			do_lookup(current_lookup);
e07df0
 		else if (next_origin(current_lookup))
e07df0
 			check_next_lookup(current_lookup);
e07df0
+		else {
e07df0
+			cancel_lookup(current_lookup);
e07df0
+			check_next_lookup(current_lookup);
e07df0
+		}
e07df0
 	} else {
e07df0
 		check_if_done();
e07df0
 	}
e07df0
-- 
e07df0
2.21.0
e07df0