netdev
[Top] [All Lists]

Re: PATCH: IPSEC xfrm events

To: jamal <hadi@xxxxxxxxxx>
Subject: Re: PATCH: IPSEC xfrm events
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 2 Apr 2005 11:28:13 +1000
Cc: Patrick McHardy <kaber@xxxxxxxxx>, Masahide NAKAMURA <nakam@xxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev <netdev@xxxxxxxxxxx>
In-reply-to: <1112403845.1088.14.camel@jzny.localdomain>
References: <1112319441.1089.83.camel@jzny.localdomain> <20050401042106.GA27762@gondor.apana.org.au> <1112353398.1096.116.camel@jzny.localdomain> <20050401114258.GA2932@gondor.apana.org.au> <1112358278.1096.160.camel@jzny.localdomain> <20050401123554.GA3468@gondor.apana.org.au> <1112403845.1088.14.camel@jzny.localdomain>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
Hi Jamal:

On Fri, Apr 01, 2005 at 08:04:05PM -0500, jamal wrote:
>
> The issue is that pfkey echoes back a few things from the original
> message - important ones being version, pid, seq, and msgtype (as a
> sample take a look at pfkey_add()). So these need to be remembered...

You're right.  The pid and seq should be stored in km_event by
af_key and xfrm_user before they call km_notify.  In fact bring
back that the km_type field too and put it in km_event.  That'll
become useful when we figure out a way to include it in the netlink
message so that the originator can be uniquely identified.

The version should always be set by the kernel though.  This is because
the packet we're broadcasting has been regenerated by the kernel.  If
we ever get PFKEY v3 then in order that all existing applications
understand these messages you'll have to reformat them as PFKEY v2
anyway.

msgtype should be derived from the event as you did in xfrm_user.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<Prev in Thread] Current Thread [Next in Thread>