From 660f966c830b9ad4214883e71db5da70309ec13e Mon Sep 17 00:00:00 2001
From: Stanislav Levin <slev@altlinux.org>
Date: Mon, 31 Aug 2020 12:25:33 +0300
Subject: [PATCH] dns: Make use of `resolve_address` of a current resolver
 instead of the global one

For now, `resolve_address` for dnspython < 2.0.0 is actually
the instance method of the global DNSResolver object and is not
the instance method of the corresponding object from which it was
called. This can result in unexpected behavior.

Signed-off-by: Stanislav Levin <slev@altlinux.org>
---
 ipapython/dnsutil.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipapython/dnsutil.py b/ipapython/dnsutil.py
index 7c4ef7acea..63eb64dc11 100644
--- a/ipapython/dnsutil.py
+++ b/ipapython/dnsutil.py
@@ -111,7 +111,7 @@ def _resolve_address(self, ip_address, *args, **kwargs):
         :param ip_address: IPv4 or IPv6 address
         :type ip_address: str
         """
-        return resolve(
+        return self.resolve(
             dns.reversename.from_address(ip_address),
             rdtype=dns.rdatatype.PTR,
             *args,
