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{}
|
delegations := map[string]*Delegation{}
|
||||||
|
|
||||||
for _, record := range a.SearchRR(svcs.AnalyzerRecordFilter{Type: dns.TypeNS}) {
|
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 ns, ok := record.(*dns.NS); ok {
|
||||||
if _, ok := delegations[ns.Header().Name]; !ok {
|
if _, ok := delegations[ns.Header().Name]; !ok {
|
||||||
delegations[ns.Header().Name] = &Delegation{}
|
delegations[ns.Header().Name] = &Delegation{}
|
||||||
|
|
|
@ -51,6 +51,10 @@ type Analyzer struct {
|
||||||
defaultTTL uint32
|
defaultTTL uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *Analyzer) GetOrigin() string {
|
||||||
|
return a.origin
|
||||||
|
}
|
||||||
|
|
||||||
type AnalyzerRecordFilter struct {
|
type AnalyzerRecordFilter struct {
|
||||||
Prefix string
|
Prefix string
|
||||||
Domain string
|
Domain string
|
||||||
|
|
Loading…
Reference in New Issue
Block a user