From 990d6094238580be2e0f4c8dbdadc1acdea5ca02 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Thu, 4 Jan 2024 15:46:44 +0530 Subject: [PATCH 1/2] Update README.md added macarne as sponsor --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1cc38f6e..d67ea2cd 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Be it a home network or an organization's network, having a locally running DNS # Sponsored By

Altha Technology - Censorship Resistant Data Services + Macarne - Worldwide Bare Metal Solutions

# Features From d962a84b7fc4867556bfd909c3e26d001fca83ec Mon Sep 17 00:00:00 2001 From: Alexander Horner <33007665+alexhorner@users.noreply.github.com> Date: Wed, 10 Jan 2024 19:44:11 +0000 Subject: [PATCH 2/2] Fix AAA responses not being produced when there are no DNS64 exclusions --- Apps/Dns64App/App.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Apps/Dns64App/App.cs b/Apps/Dns64App/App.cs index 8d2b0dae..d9851244 100644 --- a/Apps/Dns64App/App.cs +++ b/Apps/Dns64App/App.cs @@ -20,6 +20,7 @@ along with this program. If not, see . using DnsServerCore.ApplicationCommon; using System; using System.Collections.Generic; +using System.Linq; using System.Net; using System.Net.Sockets; using System.Text.Json; @@ -123,22 +124,34 @@ namespace Dns64 List newAnswer = new List(response.Answer.Count); bool synthesizeAAAA = true; + bool anyExclusions = group.ExcludedIpv6.Any(); foreach (DnsResourceRecord answer in response.Answer) { + //If this isn't an AAAA, include it in the new answer as we don't need to mess with it if (answer.Type != DnsResourceRecordType.AAAA) { newAnswer.Add(answer); continue; } - + + //If there aren't any exclusions, and we have an AAAA already, we can just accept that AAAA and not synthesize anything + if (answer.Type == DnsResourceRecordType.AAAA && !anyExclusions) + { + newAnswer.Add(answer); + synthesizeAAAA = false; + continue; + } + + //At this point, we have an AAAA and we have at least one exclusion. We need to check the AAAA against the exclusion list + IPAddress ipv6Address = (answer.RDATA as DnsAAAARecordData).Address; foreach (NetworkAddress excludedIpv6 in group.ExcludedIpv6) { if (!excludedIpv6.Contains(ipv6Address)) { - //found non-excluded AAAA record so no need to synthesize AAAA + //This AAAA is not excluded and so we can just accept it and not synthesize anything newAnswer.Add(answer); synthesizeAAAA = false; }