Subject: Re: ip xfrm bug

From: jamal <[email-masked]>
Date: Sun, 23 Dec 2007 08:06:45 -0500

On Sun, 2007-16-12 at 15:43 +0800, Herbert Xu wrote:

> Jamal's going to hate me but setkey(8) already uses this so we're
> stuck with it anyway.
> 
> The test is
> 
> 	up->index % 8 >= 3
> 
> This is true iff it's a socket policy.

I would have loved it if user space had a say ;-> 
In the case of tc actions for example; the (table) index abides to the
following rules:

 if user space specified one in rule insertion then {
     if available, use the allowed entry {
     } else if inuse {
         if replace flag is set then {
            replace
        } else {
         return error
     }
  } else {
   grab the next available index
  }

makes management from user space much simpler.

cheers,
jamal