netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH: IPSEC acquire in presence of multiple managers
@ 2005-03-26  0:12 jamal
  2005-03-26  0:30 ` Herbert Xu
  2005-03-26 18:35 ` Resend: " jamal
  0 siblings, 2 replies; 18+ messages in thread
From: jamal @ 2005-03-26  0:12 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller; +Cc: Masahide NAKAMURA, Shinta Sugimoto, netdev

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]


Herbert/Dave,

Acquire should be supported by both pfkey and netlink.
However, it stops to send acquire message from the kernel on first
success.
It is possible that one or the other manager maybe passively monitoring
and needs to see those messages.

Thanks to Masahide NAKAMURA <nakam@linux-ipv6.org>, Shinta Sugimoto
<shinta.sugimoto@ericsson.com> for both identifying the issue and
validating the fix.

If you want i can put this with other NLMSGALIGN one liner i mentioned
earlier.

cheers,
jamal

[-- Attachment #2: acq_p --]
[-- Type: text/plain, Size: 708 bytes --]

--- a/net/xfrm/xfrm_state.c	2005/03/25 17:44:43	1.1
+++ b/net/xfrmxfrm_state.c	2005/03/25 18:55:33
@@ -774,16 +774,20 @@
 		wake_up(&km_waitq);
 }
 
+/*
+ * We send to all registered managers regardless of failure
+ * We are happy with one success
+*/
 int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol)
 {
-	int err = -EINVAL;
+	int err = -EINVAL, acqret = -EINVAL;
 	struct xfrm_mgr *km;
 
 	read_lock(&xfrm_km_lock);
 	list_for_each_entry(km, &xfrm_km_list, list) {
-		err = km->acquire(x, t, pol, XFRM_POLICY_OUT);
-		if (!err)
-			break;
+		acqret = km->acquire(x, t, pol, XFRM_POLICY_OUT);
+		if (!acqret)
+			err = acqret;
 	}
 	read_unlock(&xfrm_km_lock);
 	return err;

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

end of thread, other threads:[~2005-04-01 11:15 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-26  0:12 PATCH: IPSEC acquire in presence of multiple managers jamal
2005-03-26  0:30 ` Herbert Xu
2005-03-26  0:54   ` jamal
2005-03-26  0:58     ` Herbert Xu
2005-03-26  1:11       ` jamal
2005-03-26  2:32         ` Herbert Xu
2005-03-26 18:41           ` jamal
2005-03-26 19:42             ` Herbert Xu
2005-03-26 19:45               ` Herbert Xu
2005-03-26 20:06                 ` jamal
2005-03-26  1:23       ` Patrick McHardy
2005-03-26 18:35 ` Resend: " jamal
2005-03-26 19:27   ` Herbert Xu
2005-03-26 20:13     ` jamal
2005-03-27  8:21       ` Herbert Xu
2005-03-27 19:01         ` jamal
2005-04-01  5:13   ` David S. Miller
2005-04-01 11:15     ` jamal

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