From: Patrick McHardy <kaber@trash.net>
To: hadi@cyberus.ca
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: Mon, 09 May 2005 13:45:20 +0200 [thread overview]
Message-ID: <427F4D50.4060702@trash.net> (raw)
In-Reply-To: <1115573038.19561.174.camel@localhost.localdomain>
jamal wrote:
> 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?
Not sure why they're not marked as per-socket. Probably because
sadb_x_policy_id is a KAME extension and KAME pf_key doesn't dump
these policies with SADB_X_SPDDUMP. Racoon needs to skip them
to avoid adding them to its internal SPD, they could conflict
with global policies.
>>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?
Disallowing this special case seems a bit inconsistent to me. We can
deduce which are per-socket from the list they are contained in. We
don't notify on per-socket policy change, perhaps we should also skip
them when dumping in pf_key.
Regards
Patrick
next prev parent reply other threads:[~2005-05-09 11:45 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
2005-05-09 11:45 ` Patrick McHardy [this message]
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=427F4D50.4060702@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=herbert@gondor.apana.org.au \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.