services: Delegation cannot be at origin

This commit is contained in:
nemunaire 2023-11-27 17:43:09 +01:00
parent deabdfbac9
commit c2ce947f97
1 changed files with 2 additions and 1 deletions

View File

@ -33,6 +33,7 @@ package abstract
import (
"fmt"
"strings"
"github.com/StackExchange/dnscontrol/v4/models"
"github.com/miekg/dns"
@ -83,7 +84,7 @@ func delegation_analyze(a *svcs.Analyzer) error {
delegations := map[string]*Delegation{}
for _, record := range a.SearchRR(svcs.AnalyzerRecordFilter{Type: dns.TypeNS}) {
if record.NameFQDN == a.GetOrigin() {
if record.NameFQDN == strings.TrimSuffix(a.GetOrigin(), ".") {
continue
}