Don't except Delegation on origin

This commit is contained in:
nemunaire 2021-01-06 03:20:31 +01:00
parent 6294a373d1
commit c6e09dd5a5
2 changed files with 8 additions and 0 deletions

View File

@ -92,6 +92,10 @@ func delegation_analyze(a *svcs.Analyzer) error {
delegations := map[string]*Delegation{}
for _, record := range a.SearchRR(svcs.AnalyzerRecordFilter{Type: dns.TypeNS}) {
if record.Header().Name == a.GetOrigin() {
continue
}
if ns, ok := record.(*dns.NS); ok {
if _, ok := delegations[ns.Header().Name]; !ok {
delegations[ns.Header().Name] = &Delegation{}

View File

@ -51,6 +51,10 @@ type Analyzer struct {
defaultTTL uint32
}
func (a *Analyzer) GetOrigin() string {
return a.origin
}
type AnalyzerRecordFilter struct {
Prefix string
Domain string