Re: DDoS attack causing bad effect on conntrack searches

Eric Dumazet
2010-04-23T11:05:30Z

Le vendredi 23 avril 2010 à 12:55 +0200, Patrick McHardy a écrit :
> Eric Dumazet wrote:
> >
> > OK but a lookup last a fraction of a micro second, unless interrupted by
> > hard irq.
> >
> > Probability of a change during a lookup should be very very small.
> >
> > Note that the scenario for a restart is :
> >
> > The lookup go through the chain.
> > While it is examining one object, this object is deleted.
> > The object is re-allocated by another cpu and inserted to a new chain.
>
> I think another scenario that seems a bit more likely would be
> that a new entry is added to the chain after it was fully searched.
> Perhaps we could continue searching at the last position if the
> last entry is not a nulls entry to improve this.

But the last entry is always a nulls entry, what do you mean exactly ?

When an unsert (of a fresh object, not a reused one) is done, this
doesnt affect lookups in any way, since its done at the head of list.