netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jamal <hadi@cyberus.ca>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
	Masahide NAKAMURA <nakam@linux-ipv6.org>,
	Patrick McHardy <kaber@trash.net>, netdev <netdev@oss.sgi.com>
Subject: Re: [7/7] [IPSEC] Add XFRMA_SA/XFRMA_POLICY for delete notification
Date: Sun, 08 May 2005 09:56:33 -0400	[thread overview]
Message-ID: <1115560594.19561.117.camel@localhost.localdomain> (raw)
In-Reply-To: <20050507193538.GA28991@gondor.apana.org.au>

On Sun, 2005-08-05 at 05:35 +1000, Herbert Xu wrote:
> On Sat, May 07, 2005 at 08:46:44AM -0400, jamal wrote:
> > 
> > No, this is not true. Study the tc code.
> > It is nice to be able to return exactly the same detail - user space can
> > then infer what exactly happened. It is nicer to be able to return more
> > detail because user space doesnt have to infer anything.
> 
> This patch is making it return more detail, not less! The full
> description of the deleted policy/state is still being returned,
> albeit as RTA payloads.

It's the other extreme of what i thought.
The only thing user space needs to know is what object was deleted.
If you just passed the id, it could be deduced if user space maintained
state; if you pass the object, no such deduction is needed.

> Prior to the change, netlink users do not know whether the original
> policy delete request was by selector or by id.  Now that information
> is also returned.
> 

Why would someone need to deduce whether it has been deleted by index or
selector?
If you gave me the object - i can reproduce the action of deleting it.
Thats the _only_ important_ thing.

> > You describe the patch this way
> > 
> > ---
> > This patch changes the format of the XFRM_MSG_DELSA and
> > XFRM_MSG_DELPOLICY notification so that the main message
> > sent is of the same format as that received by the kernel
> > if the original message was via netlink.
> > ----
> > 
> > That it only happens when you delete via netlink. Is this not so?
> 
> The same change applies even if you sent the delete via pfkey.  What
> the change does is to make netlink always send a delete message that
> is valid in the sense that if you sent it back to netlink then it
> would delete that policy/state.
> 

Does pfkey have ability to delete by index and selector?
If yes, how do you distinguish the two cases when you are sending the
netlink event?

> As it is the netlink delete messages sent by notification are invalid
> by its own standard.
> 

It doesnt seem to me what you provided in the patch produces exactly the
same thing that was sent by user space back in the event.
You introduce some other new TLVs to reflect it back.
But even that is besides the point:
None of those xfrm objects obey any of the standard rules 
netlink uses to begin with - you have more than one way of deleting an
object. What you need to do is the detail of what object was deleted.

Heres what i will say so we can put this to rest:
The patch is unneeded (i hate to use strong words like bogus - but it is
getting close to that), but if you feel strongly about it just lets have
it well documented and provide the iproute2 patch as well.

cheers,
jamal

  reply	other threads:[~2005-05-08 13:56 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-05 12:03 PATCH: IPSEC xfrm events jamal
2005-04-05 12:07 ` Herbert Xu
2005-04-05 12:19   ` jamal
2005-04-05 12:24     ` Arnaldo Carvalho de Melo
2005-04-09 10:54 ` [1/4] [IPSEC] Improve xfrm to pfkey SA state conversion Herbert Xu
2005-04-09 11:12   ` [2/4] [IPSEC] Kill spurious hard expire messages Herbert Xu
2005-04-09 11:15     ` [3/4] [IPSEC] Turn km_event.data into a union Herbert Xu
2005-04-10  7:48       ` [4/4] [IPSEC] Set byid for km_event in xfrm_get_policy Herbert Xu
2005-04-10  9:02         ` [5/*] [IPSEC] Use XFRM_MSG_* instead of XFRM_SAP_* Herbert Xu
2005-04-10  9:38           ` [6/*] [IPSEC] Add xfrm_userpolicy_delete for xfrm_user notification Herbert Xu
2005-04-10 14:15           ` [5/*] [IPSEC] Use XFRM_MSG_* instead of XFRM_SAP_* jamal
2005-04-10 21:28             ` Herbert Xu
2005-04-11  5:45             ` Masahide NAKAMURA
2005-04-11 11:26               ` jamal
2005-04-12  8:17                 ` Masahide NAKAMURA
2005-04-12 13:37                   ` jamal
2005-04-13  5:07                     ` Masahide NAKAMURA
2005-04-09 12:30     ` [2/4] [IPSEC] Kill spurious hard expire messages jamal
2005-04-09 19:29       ` Herbert Xu
2005-04-09 20:03         ` Herbert Xu
2005-04-10 14:10           ` jamal
2005-04-10 21:27             ` Herbert Xu
2005-04-11 11:20               ` jamal
2005-04-11 11:30                 ` Herbert Xu
2005-04-11 11:57                   ` jamal
2005-04-11 12:08                     ` Herbert Xu
2005-05-07  7:14   ` [0/7] [IPSEC] IPsec event notification Herbert Xu
2005-05-07  7:18     ` [1/7] [IPSEC] Add complete xfrm " Herbert Xu
2005-05-07  7:18       ` Herbert Xu
2005-05-07  7:19       ` [2/7] [IPSEC] Fix xfrm to pfkey SA state conversion Herbert Xu
2005-05-07  7:20         ` [3/7] [IPSEC] Kill spurious hard expire messages Herbert Xu
2005-05-07  7:21           ` [4/7] [IPSEC] Turn km_event.data into a union Herbert Xu
     [not found]             ` <20050507072216.GF5753@gondor.apana.org.au>
     [not found]               ` <20050507072251.GG5753@gondor.apana.org.au>
     [not found]                 ` <20050507072349.GH5753@gondor.apana.org.au>
2005-05-07 12:04                   ` [7/7] [IPSEC] Add XFRMA_SA/XFRMA_POLICY for delete notification jamal
2005-05-07 12:25                     ` Herbert Xu
2005-05-07 12:46                       ` jamal
2005-05-07 19:35                         ` Herbert Xu
2005-05-08 13:56                           ` jamal [this message]
2005-05-08 21:40                             ` Herbert Xu
2005-05-09  0:06                               ` jamal
2005-05-07 14:51       ` [1/7] [IPSEC] Add complete xfrm event notification Patrick McHardy
2005-05-07 19:42         ` Herbert Xu

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=1115560594.19561.117.camel@localhost.localdomain \
    --to=hadi@cyberus.ca \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kaber@trash.net \
    --cc=nakam@linux-ipv6.org \
    --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).