On Mon, Sep 18, 2023 at 01:59:47PM +0200, Pablo Neira Ayuso wrote:
One more question: this walk might miss entries but may it also
duplicate the same entries?
It depends on what happens during the walk. If you're lucky
and no resize event occurs during the walk, then you won't miss
any entries or see duplicates.
When a resize event does occur, then we will tell you that it
happened by returning EAGAIN. It means that you should start
from the beginning and redo the whole walk. If you do that
then you won't miss anything (although, you may never finish
if the table keeps getting resized).
But obviously duplicates will occur if you take this approach.
I will work on a patch to update netfilter clients for this code to
use a rcu linked list.
Sounds good!
Thanks,
--
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt