All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Joakim Koskela <joakim.koskela@hiit.fi>
Cc: netdev@vger.kernel.org
Subject: Re: Problem with xfrm (ipsec) as state/spi selected solely on outer ip addresses
Date: Fri, 11 May 2007 18:13:41 +0200	[thread overview]
Message-ID: <46449635.3050206@trash.net> (raw)
In-Reply-To: <200705111622.24680.joakim.koskela@hiit.fi>

Joakim Koskela wrote:
> I'm running a system where there might be multiple simultenously
> active ipsec states between two hosts (ipv6, but guess it applies to
> v4 as well) where the outer ip is the same for all states, but the
> inner differ (using beet mode).
> 
> The problem is that after establishing these states, it seems that the
> one associated with outgoing traffic is selected solely by the outer
> address (the first state matching the outer ip-pairs is used), which
> usually results in the wrong spi and the packet being dropped at the
> receiver.


This should only pick states matching the flow:

if (x->km.state == XFRM_STATE_VALID) {


        if (!xfrm_selector_match(&x->sel, fl, family) ||
            !security_xfrm_state_pol_flow_match(x, pol, fl))
                continue;
...

I'm probably misunderstanding your configuration, could you post the
SA selectors and addresses that result in an incorrect state being
picked?


  reply	other threads:[~2007-05-11 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-11 13:22 Problem with xfrm (ipsec) as state/spi selected solely on outer ip addresses Joakim Koskela
2007-05-11 16:13 ` Patrick McHardy [this message]
2007-05-14  8:00   ` Joakim Koskela

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=46449635.3050206@trash.net \
    --to=kaber@trash.net \
    --cc=joakim.koskela@hiit.fi \
    --cc=netdev@vger.kernel.org \
    /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.