#893 SkipHosts dropping too many records (patch included)

7.0
open
nobody
5
2012-10-11
2012-05-08
Teppo Sulavuori
No

I found out that there is a bug in handling %host_r LogFormat key that results in dropping seemingly random records when SkipHosts config parameter is defined.

Reason: $pos_hostr is initialized to value -1 but in SkipHosts testing it is only compared to be true to have an effect.

Result: If %host_r is NOT included in LogFormat string then SkipHosts regexps are tested also against second to last field in LogFormat.

Patch included.

Patch fixes also similar bug in OnlyHosts handling.

Discussion

  • Patch to fix %host_r LogFormat key handling in SkipHosts testing.

     
  • Seems this bug has existed since year 2006, see bug #1436740

    (And I stand corrected, it is the last field of LogFormat, not second to last.)