#893 SkipHosts dropping too many records (patch included)


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.


  • Teppo Sulavuori

    Teppo Sulavuori - 2012-05-08

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

  • Teppo Sulavuori

    Teppo Sulavuori - 2012-05-08

    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.)


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks