netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jamal <hadi@cyberus.ca>
To: Patrick McHardy <kaber@trash.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	netdev <netdev@oss.sgi.com>
Subject: Re: resend patch:  xfrm policybyid
Date: Sun, 08 May 2005 13:23:58 -0400	[thread overview]
Message-ID: <1115573038.19561.174.camel@localhost.localdomain> (raw)
In-Reply-To: <427E2F0D.4040902@trash.net>

On Sun, 2005-08-05 at 17:23 +0200, Patrick McHardy wrote:

> Allowing the user to freely set indices breaks racoon:
> 
> #ifdef __linux__
>         /* bsd skips over per-socket policies because there will be no
>          * src and dst extensions in spddump messages. On Linux the only
>          * way to achieve the same is check for policy id.
>          */
>         if (xpl->sadb_x_policy_id % 8 >= 3) return 0;
> #endif
> 

I can see where the %8 >= 3 comes from.
[per socket creation with calls xfrm_gen_index(XFRM_POLICY_MAX+dir)
and the kernel does things in increments of 8]

I didnt quiet understand that check in racoon: Why this guess work? if
per-socket policies need to be identified, why dont they get explicitly
marked as per-socket somehow? I am actually curious why that check is
needed. Sorry have never stared at the racoon code. Do other IKE/ISAKMP
daemons depend on it?

> So how could we handle this?
> 

We can disallow the explicit setting of any index which passes test
(index % 8 >= 3) - but it does seem to me the whole concept of reserving
those indices for per-socket policies is a bit of a hack and may need a
rethinking. Maybe we need to maintain a mark in the kernel for
per-socket polices and do the same as BSD?

cheers,
jamal

  reply	other threads:[~2005-05-08 17:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-05 13:14 resend patch: xfrm policybyid jamal
2005-05-05 21:32 ` Herbert Xu
2005-05-05 22:17   ` jamal
2005-05-05 22:18     ` David S. Miller
2005-05-06 13:28       ` Herbert Xu
2005-05-06 18:20         ` David S. Miller
2005-05-05 23:12     ` Herbert Xu
2005-05-06  1:15       ` jamal
2005-05-06  1:31         ` Herbert Xu
2005-05-06  2:10           ` jamal
2005-05-06  2:20             ` jamal
2005-05-06  8:54             ` Herbert Xu
2005-05-06 11:53               ` jamal
2005-05-07 10:55                 ` Herbert Xu
2005-05-07 12:38                   ` jamal
2005-05-08  8:07                     ` Herbert Xu
2005-05-08 14:30                       ` jamal
2005-05-08 15:23                         ` Patrick McHardy
2005-05-08 17:23                           ` jamal [this message]
2005-05-09 11:45                             ` Patrick McHardy
2005-05-09 13:10                               ` jamal
2005-05-06 11:04     ` Herbert Xu
2005-05-06 11:56       ` jamal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1115573038.19561.174.camel@localhost.localdomain \
    --to=hadi@cyberus.ca \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kaber@trash.net \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).