Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
caffix committed Nov 26, 2024
1 parent 14ebc7a commit dbbc997
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion engine/plugins/dns/apex.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (d *dnsApex) check(e *et.Event) error {
return nil
}

// determine which domain apex this name is a node in
// determine which domain apex is the parent of this name
var apex *dbt.Entity
best := len(fqdn.Name)
for _, name := range d.plugin.apexList.Slice() {
Expand Down
4 changes: 2 additions & 2 deletions engine/plugins/dns/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (d *dnsIP) check(e *et.Event) error {
}

if len(ips) > 0 {
d.process(e, fqdn.Name, ips, src)
d.process(e, fqdn.Name, ips)

for _, v := range ips {
ip, ok := v.ip.Asset.(*oamnet.IPAddress)
Expand Down Expand Up @@ -169,7 +169,7 @@ func (d *dnsIP) store(e *et.Event, fqdn *dbt.Entity, src *et.Source, rr []*resol
return ips
}

func (d *dnsIP) process(e *et.Event, name string, addrs []*relIP, src *et.Source) {
func (d *dnsIP) process(e *et.Event, name string, addrs []*relIP) {
for _, a := range addrs {
ip := a.ip.Asset.(*oamnet.IPAddress)

Expand Down
2 changes: 1 addition & 1 deletion engine/plugins/dns/subs.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ func (d *dnsSubs) query(e *et.Event, subdomain string, src *et.Source) []*relSub

for i, t := range d.types {
if rr, err := support.PerformQuery(subdomain, t.Qtype); err == nil && len(rr) > 0 {
d.plugin.apexList.Insert(subdomain)
if records := d.store(e, subdomain, src, rr); len(records) > 0 {
alias = append(alias, records...)
d.plugin.apexList.Insert(subdomain)
}
} else if i == 0 {
// do not continue if we failed to obtain the NS record
Expand Down

0 comments on commit dbbc997

Please sign in to comment.