From 3ab541b9a97d2ed8987a34ceba3a660cb90e5eae Mon Sep 17 00:00:00 2001
From: Alex Zorin <alex@zorin.id.au>
Date: Mon, 13 Sep 2021 07:03:13 +1000
Subject: [PATCH] dns-rfc2136: use certbot's own is_ipaddress func
---
.../certbot_dns_rfc2136/_internal/dns_rfc2136.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/certbot-dns-rfc2136/certbot_dns_rfc2136/_internal/dns_rfc2136.py b/certbot-dns-rfc2136/certbot_dns_rfc2136/_internal/dns_rfc2136.py
index 9fa68c9d98..98687e6abc 100644
--- a/certbot-dns-rfc2136/certbot_dns_rfc2136/_internal/dns_rfc2136.py
+++ b/certbot-dns-rfc2136/certbot_dns_rfc2136/_internal/dns_rfc2136.py
@@ -3,7 +3,6 @@
from typing import Optional
import dns.flags
-from dns.inet import is_address
import dns.message
import dns.name
import dns.query
@@ -16,6 +15,7 @@
from certbot import errors
from certbot.plugins import dns_common
from certbot.plugins.dns_common import CredentialsConfiguration
+from certbot.util import is_ipaddress
logger = logging.getLogger(__name__)
@@ -57,7 +57,7 @@ def more_info(self): # pylint: disable=missing-function-docstring
def _validate_credentials(self, credentials):
server = credentials.conf('server')
- if not is_address(server):
+ if not is_ipaddress(server):
raise errors.PluginError("The configured target DNS server ({0}) is not a valid IPv4 "
"or IPv6 address. A hostname is not allowed.".format(server))
algorithm = credentials.conf('algorithm')