Re: [PATCH] xt_recent: Fix false hit_count match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, 19. March 2010 16:41:49 you wrote:
> > Maybe this is related to the xt_recent
> > proc interface creating the entry
> > (with a zero hit count)?
> 
> Mhh, looking at that patch again, I think it should actually do:
> 
> if (!info->hit_count || ++hits >= info->hit_count)
>     ...
> 
> since a hit_count of 0 implies that the user just wants to check for the
> presence of the entry. Thomas, could you give that a try?

The new code works. Isn't that almost the same as reverting
the original patch? info->hit_count == 0 will match again.

So we could just go back to

"if (++hits >= info->hit_count)"

Or am I missing something?

Clearly your new version is more readable about the intent.

Cheers,
Thomas
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux