dnsforward -- fix panic on ANY request
This commit is contained in:
@@ -168,7 +168,7 @@ func (r *dayTop) addEntry(entry *logEntry, q *dns.Msg, now time.Time) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if entry.Result.IsFiltered {
|
||||
if entry.Result != nil && entry.Result.IsFiltered {
|
||||
err := runningTop.hours[hour].incrementBlocked(hostname)
|
||||
if err != nil {
|
||||
log.Printf("Failed to increment value: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user