Don't except Delegation on origin
This commit is contained in:
parent
6294a373d1
commit
c6e09dd5a5
|
@ -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{}
|
||||
|
|
|
@ -51,6 +51,10 @@ type Analyzer struct {
|
|||
defaultTTL uint32
|
||||
}
|
||||
|
||||
func (a *Analyzer) GetOrigin() string {
|
||||
return a.origin
|
||||
}
|
||||
|
||||
type AnalyzerRecordFilter struct {
|
||||
Prefix string
|
||||
Domain string
|
||||
|
|
Loading…
Reference in New Issue