Vasily Averin wrote: > Patrick McHardy wrote: > > it is incorrect again: when cnt=0 you should break both cycles. Indeed, thanks. Fixed now. Also changed it to leave the loop if we found an entry within a chain (we want the last one of the chain, so we still walk it entirely) and replaced hash = (hash + 1) % nf_conntrack_htable_size by hash = (hash + 1) & (nf_conntrack_htable_size - 1) since one of my queued patches makes sure that its always a power of two.