netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Maillist netdev <netdev@oss.sgi.com>
Subject: Re: IPsec xfrm resolution
Date: Sat, 19 Feb 2005 07:03:32 +0100	[thread overview]
Message-ID: <4216D6B4.5070901@trash.net> (raw)
In-Reply-To: <20050218100854.GA19427@gondor.apana.org.au>

Herbert Xu wrote:

>On Fri, Feb 18, 2005 at 12:26:57AM +0100, Patrick McHardy wrote:
>  
>
>>I'm not sure yet how to deal with optional SAs. We shouldn't add
>>incomplete optional tunnel mode SAs to the bundle because then we
>>can't determine the output device, but if we don't nothing will
>>trigger resolving of optional SAs following a non-optional SA that
>>needs to be resolved.
>>    
>>
>
>I don't get it.  Can't you just add it into the bundle but ignore it
>for dst->output and other calculations until it's either realised or
>removed?
>  
>
An optional tunnel mode SA might change peer/dev/rt_gateway/rt_type if
successfully resolved. This introduces a couple of problems:

- MTU estimatation impossible
- netfilter LOCAL_OUT hook sees incorrect output device
- strict source routing check done with incorrect rt_gateway

Simply ignoring these SAs if they are not available when the bundle is
created looks like the easiest solution to me.

>>I thought about adding the queue to the xfrm_dst and adding a dummy
>>xfrm_state with a selector that matches only the current flow. This
>>    
>>
>
>The inner flow is probably not the best key for this.  How about
>keying it using the outer remote address on the template? The SAs
>have a bydst hash which makes this easy to look up.
>
>So we would attach each packet to a queue shared by all SAs to a
>specific (outer) remote address.
>  
>
That sounds reasonable. The selector initialized to the inner flow is
meant for cacheing the incomplete bundle at the policy. We can have
multiple SAs with equal family/reqid/saddr/daddr/mode/proto differing
only be SPI and selector. If we use a selector selecting more than the
inner flow we could create a conflict with an already existing cached
bundle.

Regards
Patrick

  reply	other threads:[~2005-02-19  6:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050209085251.GA9030@gondor.apana.org.au>
     [not found] ` <420B9DF1.3020704@trash.net>
     [not found]   ` <20050210202810.GA1609@gondor.apana.org.au>
     [not found]     ` <42144C3F.2060501@trash.net>
     [not found]       ` <20050217091137.GA9476@gondor.apana.org.au>
2005-02-17 23:26         ` IPsec xfrm resolution Patrick McHardy
2005-02-18 10:08           ` Herbert Xu
2005-02-19  6:03             ` Patrick McHardy [this message]
2005-02-19  9:23               ` Herbert Xu
2005-02-19 12:29                 ` Patrick McHardy
2005-02-19 18:32                   ` Herbert Xu
2005-02-19 18:47                     ` Patrick McHardy
2005-02-19 19:03                       ` Herbert Xu
2005-02-19 19:53                         ` Patrick McHardy
2005-02-19 20:26                           ` Patrick McHardy
2005-02-20  6:57                             ` Herbert Xu
2005-03-18  4:32                 ` David S. Miller
2005-03-18  6:24                   ` Herbert Xu
2005-03-20 15:51                   ` Patrick McHardy
2005-03-20 20:38                     ` Herbert Xu
2005-03-23  2:28                       ` Patrick McHardy

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=4216D6B4.5070901@trash.net \
    --to=kaber@trash.net \
    --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 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).