From ad20d34cfb1d78e1c12270209fcb22070f51f648 Mon Sep 17 00:00:00 2001 From: badra001 Date: Wed, 17 May 2023 12:40:33 -0400 Subject: [PATCH] case insenstive RR compare --- code/ddns-lambda.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/ddns-lambda.py b/code/ddns-lambda.py index 4b46170..d001923 100755 --- a/code/ddns-lambda.py +++ b/code/ddns-lambda.py @@ -73,7 +73,7 @@ LOGGER = logging.getLogger() account_id = None region = None -VERSION = '2.0.5' +VERSION = '2.0.6' # Read Env variables DEBUG_LOG_LEVEL = os.environ.get('DebugLogLevel', 'INFO') @@ -1980,8 +1980,8 @@ def new_get_resource_record(oclient, instance_id, zone_id, host_name, hosted_zon rr_name = rr_set['Name'] # check if the return value matches the record, if not ignore # if the record isn't there, it returns the list_resource_record_sets returns the next record -# if rr_name == (host_name + hosted_zone_name): - if rr_name == fqdn: +# make checks case insensitive + if rr_name.lower() == fqdn.lower(): value = rr_set['ResourceRecords'][0]['Value'] LOGGER.debug( f"list_resource_record_sets returned value {value}: {lineno()}")