Subject: Re: xfrm_state locking regression...

From: Timo Teräs <[email-masked]>
Date: Thu, 25 Sep 2008 09:03:21 +0300

Herbert Xu wrote:
> On Wed, Sep 24, 2008 at 04:18:37PM +0300, Timo Teräs wrote:
>> Gave it a test spin and found one bug. The walking routine will
>> get called one extra time when it has successfully dumped
>> everything so we need to check for that in the beginning; the
>> earlier version would start all over from the beginning resulting
>> never ending dumps.
> 
> Aha, that's why the if statement was there :)

Yup.

I forgot to test pf_key support. And remembered why the "last"
thingy was in the walking routines. In pf_key dumps, the dump
is terminated when an entry with seq zero is received; that's
why the final entry received special treatment. And now that
breaks. The first entry is zero so pf_key dumps only one entry.

Not sure if we should fix this in pf_key or in the walking routines.

Cheers,
  Timo