From 4c898fcb512bf72e267369a53a4fbadd10a2bb79 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sun, 9 Jul 2023 15:56:52 +0530 Subject: [PATCH] WeightedRoundRobinApp: fixed issue with wildcard records. --- Apps/WeightedRoundRobinApp/Address.cs | 2 +- Apps/WeightedRoundRobinApp/CNAME.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Apps/WeightedRoundRobinApp/Address.cs b/Apps/WeightedRoundRobinApp/Address.cs index 2fc30853..9eb45211 100644 --- a/Apps/WeightedRoundRobinApp/Address.cs +++ b/Apps/WeightedRoundRobinApp/Address.cs @@ -51,7 +51,7 @@ namespace WeightedRoundRobin { DnsQuestionRecord question = request.Question[0]; - if (!question.Name.Equals(appRecordName, StringComparison.OrdinalIgnoreCase)) + if (!question.Name.Equals(appRecordName, StringComparison.OrdinalIgnoreCase) && !appRecordName.StartsWith("*.", StringComparison.OrdinalIgnoreCase)) return Task.FromResult(null); string jsonPropertyName; diff --git a/Apps/WeightedRoundRobinApp/CNAME.cs b/Apps/WeightedRoundRobinApp/CNAME.cs index fbf9f840..c76ff04e 100644 --- a/Apps/WeightedRoundRobinApp/CNAME.cs +++ b/Apps/WeightedRoundRobinApp/CNAME.cs @@ -51,7 +51,7 @@ namespace WeightedRoundRobin { DnsQuestionRecord question = request.Question[0]; - if (!question.Name.Equals(appRecordName, StringComparison.OrdinalIgnoreCase)) + if (!question.Name.Equals(appRecordName, StringComparison.OrdinalIgnoreCase) && !appRecordName.StartsWith("*.", StringComparison.OrdinalIgnoreCase)) return Task.FromResult(null); List domainNames;