Minor bug fix

This commit is contained in:
Patrick Pacher 2020-04-21 09:59:36 +02:00
parent f2e41a0d32
commit a07c36159b
No known key found for this signature in database
GPG key ID: E8CD2DA160925A6D
2 changed files with 2 additions and 2 deletions

View file

@ -104,7 +104,7 @@ func filterDNSResponse(conn *network.Connection, rrCache *resolver.RRCache) *res
rrCache.Answer, filteredRecords, validIPs = filterDNSSection(rrCache.Answer, p, rrCache.ServerScope)
rrCache.FilteredEntries = append(rrCache.FilteredEntries, filteredRecords...)
// FIXME(ppacher): should we consider valid IPs from the extra section?
// we don't count the valid IPs in the extra section
rrCache.Extra, filteredRecords, _ = filterDNSSection(rrCache.Extra, p, rrCache.ServerScope)
rrCache.FilteredEntries = append(rrCache.FilteredEntries, filteredRecords...)

View file

@ -83,7 +83,7 @@ func (br ListBlockReason) ToRRs() []dns.RR {
wouldBeBlockedBy, err := dns.NewRR(fmt.Sprintf(
"%s-wouldBeBlockedBy. 0 IN TXT %q",
strings.TrimRight(lm.Entity, "."),
strings.Join(lm.ActiveLists, ","),
strings.Join(lm.InactiveLists, ","),
))
if err == nil {
rrs = append(rrs, wouldBeBlockedBy)