Skip to contentSkip to conversation

xfrm: Force SA to be lookup again if SA in acquire state

PATCH In review Fan Du 2 participants 3 messages Sep 23, 2013 – Oct 1, 2013

Subsystems (3)
lore
Share & tools
lore

Fan Du

author
#0 lore raw

PATCH 1/1 xfrm: Force SA to be lookup again if SA in acquire state

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.

---
 net/xfrm/xfrm_state.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/xfrm/xfrm_state.c +1 -1
index b9c3f9e..e1373d5 100644
@@ -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);
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw
Quoted 7 lines · Fan Du

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.

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

maintainer
#2 lore raw
Quoted 11 lines · Steffen Klassert
Quoted 7 lines · Fan Du

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.

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

Now applied to ipsec-next, thanks!