Re: DDoS attack causing bad effect on conntrack searches

Eric Dumazet
2010-04-23T05:44:51Z

Le jeudi 22 avril 2010 à 16:44 -0700, David Miller a écrit :
> Eric, I wonder if we run into some kind of issue on 32-bit systems
> because we always lose a bit of the conntrack hash value when we store
> it into the 'nulls' area?
>
> Wouldn't that make the "get_nulls_value(n) != hash" fail?
> --

Well, 'hash' at this time is not the result of the jhash() transform [0
- 0xFFFFFFFF], but a slot number in htable [0 - (300032-1)].

And we can have a nulls_value up to 0x7FFFFFFF (31 bits)

static inline unsigned long get_nulls_value(const struct hlist_nulls_node *ptr)
{
return ((unsigned long)ptr) >> 1;
}