maatma: domains: filter useless informations and improve GLUE
This commit is contained in:
parent
bd729c9f54
commit
708c3282e6
@ -185,7 +185,15 @@ func (student Student) GetAssociatedDomain(dn string) (rrs []Entry, err error) {
|
||||
err = errors.New(fmt.Sprintf("Unable to find domain %q.", dn))
|
||||
}
|
||||
|
||||
rrs, err = parseKnotZoneRead(AssociatedDomainSuffix, dn)
|
||||
if entries, errr := parseKnotZoneRead(AssociatedDomainSuffix, dn); err != nil {
|
||||
return nil, errr
|
||||
} else {
|
||||
for _, e := range entries {
|
||||
if e.RR != "RRSIG" && e.RR != "NSEC" && e.RR != "NSEC3" {
|
||||
rrs = append(rrs, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
@ -230,7 +238,15 @@ func (student Student) getRRDelegatedDomain(dn string, rr string) (rrs []Entry,
|
||||
err = errors.New(fmt.Sprintf("Unable to find domain %q.", dn))
|
||||
}
|
||||
|
||||
rrs, err = parseKnotZoneRead(DelegatedDomainSuffix, dn, rr)
|
||||
if entries, errr := parseKnotZoneRead(DelegatedDomainSuffix); err != nil {
|
||||
return nil, errr
|
||||
} else {
|
||||
for _, e := range entries {
|
||||
if e.RR == rr && strings.HasSuffix(strings.TrimSuffix(e.Domain, "."), strings.TrimSuffix(dn, ".")) {
|
||||
rrs = append(rrs, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user