netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] xfrm: Force SA to be lookup again if SA in acquire state
@ 2013-09-23  9:18 Fan Du
  2013-09-26  9:03 ` Steffen Klassert
  0 siblings, 1 reply; 3+ messages in thread
From: Fan Du @ 2013-09-23  9:18 UTC (permalink / raw)
  To: steffen.klassert; +Cc: davem, netdev

If SA is in the process of acquiring, which indicates this SA is more
promising and precise than the fall back option, i.e. using wild card
source address for searching less suitable SA.

So, here bail out, and try again.

Signed-off-by: Fan Du <fan.du@windriver.com>
---
 net/xfrm/xfrm_state.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index b9c3f9e..e1373d5 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -815,7 +815,7 @@ xfrm_state_find(const xfrm_address_t *daddr, const xfrm_address_t *saddr,
 			xfrm_state_look_at(pol, x, fl, encap_family,
 					   &best, &acquire_in_progress, &error);
 	}
-	if (best)
+	if (best || acquire_in_progress)
 		goto found;
 
 	h_wildcard = xfrm_dst_hash(net, daddr, &saddr_wildcard, tmpl->reqid, encap_family);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] xfrm: Force SA to be lookup again if SA in acquire state
  2013-09-23  9:18 [PATCH net-next] xfrm: Force SA to be lookup again if SA in acquire state Fan Du
@ 2013-09-26  9:03 ` Steffen Klassert
  2013-10-01 11:17   ` Steffen Klassert
  0 siblings, 1 reply; 3+ messages in thread
From: Steffen Klassert @ 2013-09-26  9:03 UTC (permalink / raw)
  To: Fan Du; +Cc: davem, netdev

On Mon, Sep 23, 2013 at 05:18:25PM +0800, Fan Du wrote:
> If SA is in the process of acquiring, which indicates this SA is more
> promising and precise than the fall back option, i.e. using wild card
> source address for searching less suitable SA.
> 
> So, here bail out, and try again.
> 
> Signed-off-by: Fan Du <fan.du@windriver.com>

This looks ok, I'll take this into ipsec-next as soon as I can
update the tree.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] xfrm: Force SA to be lookup again if SA in acquire state
  2013-09-26  9:03 ` Steffen Klassert
@ 2013-10-01 11:17   ` Steffen Klassert
  0 siblings, 0 replies; 3+ messages in thread
From: Steffen Klassert @ 2013-10-01 11:17 UTC (permalink / raw)
  To: Fan Du; +Cc: davem, netdev

On Thu, Sep 26, 2013 at 11:03:01AM +0200, Steffen Klassert wrote:
> On Mon, Sep 23, 2013 at 05:18:25PM +0800, Fan Du wrote:
> > If SA is in the process of acquiring, which indicates this SA is more
> > promising and precise than the fall back option, i.e. using wild card
> > source address for searching less suitable SA.
> > 
> > So, here bail out, and try again.
> > 
> > Signed-off-by: Fan Du <fan.du@windriver.com>
> 
> This looks ok, I'll take this into ipsec-next as soon as I can
> update the tree.

Now applied to ipsec-next, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-01 11:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-23  9:18 [PATCH net-next] xfrm: Force SA to be lookup again if SA in acquire state Fan Du
2013-09-26  9:03 ` Steffen Klassert
2013-10-01 11:17   ` Steffen Klassert

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).