Subject: Re: regression due to "flush SAD/SPD generate false events"

From: jamal <[email-masked]>
Date: Thu, 18 Feb 2010 17:52:41 -0500

On Thu, 2010-02-18 at 14:27 -0800, David Miller wrote:

> Let's see how #2 works out, if we get any more breakage
> cases reported then we'll have to revert again and go with
> #1.

Actually, i think i found the root cause. The sequence should be:

1) pfkey->kernel: flush
kernel flushes SA/SPD
2)kernel->pfkey: respond to flush message
3)kernel->all user space listeners: i just flushed the SA/SPD

#2 is always needed.
#3 is wrong if SA/SPD is empty.
kernel unfortunately sends a single broadcast which combines
#2 and #3. So the proper fix is to break #2 and #3 into
separate messages. And follow the rules above.

I dont have time to fix it right now - but i will send a patch
tommorow.

cheers,
jamal