From c7f2b6d18f0408eb0a91ec477db41a3bbaf7c8fb Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Tue, 3 Dec 2024 10:47:38 +0200 Subject: [PATCH] Added network mask for ipv6 --- odi6/odi6.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/odi6/odi6.py b/odi6/odi6.py index 986933f..c133b57 100755 --- a/odi6/odi6.py +++ b/odi6/odi6.py @@ -121,7 +121,7 @@ the hostname: {data}" params = { 'fieldType': "AAAA", 'subDomain': self.config['hostname'], - 'target': ipv6, + 'target': f"{ipv6}/128", 'ttl': self.config['ttl'] } if record_exists: @@ -193,16 +193,16 @@ same target, doing nothing.""" except Exception as error: self._log.debug(f"Exception reaching IPv6 URL. {error}") return ipv4, ipv6 - else: - self._log.error( - f"""Unable to determine the IP using + self._log.error( + f"""Unable to determine the IP using '{self.config['web_service_url']}'. Returned data: {result.content}""" - ) + ) else: self._log.error( f"""Selected method '{self.config['ip_method']}' has not been implemented.""" ) + return False def _init_log(self): ''' Initialize log object '''