From 67bcbe419fb6c1654dcd1a6d2eecc7fb1679fafc Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 4 Mar 2024 01:31:27 +0300 Subject: [PATCH] fix: Do not include faulty link-local DNS records in the list of found records --- lib/logic/cubit/dns_records/dns_records_cubit.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/logic/cubit/dns_records/dns_records_cubit.dart b/lib/logic/cubit/dns_records/dns_records_cubit.dart index 1b682dea..55fa9b5a 100644 --- a/lib/logic/cubit/dns_records/dns_records_cubit.dart +++ b/lib/logic/cubit/dns_records/dns_records_cubit.dart @@ -93,6 +93,10 @@ class DnsRecordsCubit extends ServerConnectionDependentCubit { final List foundRecords = []; try { for (final DnsRecord pendingDnsRecord in pendingDnsRecords) { + if (pendingDnsRecord.type == 'AAAA' && + (pendingDnsRecord.content?.startsWith('fe80::') ?? false)) { + continue; + } if (pendingDnsRecord.name == 'selector._domainkey') { final foundRecord = providerDnsRecords.firstWhere( (final r) => @@ -207,7 +211,6 @@ class DnsRecordsCubit extends ServerConnectionDependentCubit { records.addAll(recordsToAdd); } - /// TODO: Error handling? final ServerDomain? domain = getIt().serverDomain; await ProvidersController.currentDnsProvider!.removeDomainRecords(