summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-04-18 06:48:10 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-18 23:16:07 +0200
commitfefaa75e0451c76225863644be01e4fd70884153 (patch)
tree685d90c0d228505ba7a9188eb82c6ed6949b3b86 /net
parentMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 (diff)
downloadlinux-fefaa75e0451c76225863644be01e4fd70884153.tar.xz
linux-fefaa75e0451c76225863644be01e4fd70884153.zip
[IPSEC] af_key: Fix thinko in pfkey_xfrm_policy2msg()
Make sure to actually assign the determined mode to rq->sadb_x_ipsecrequest_mode. Noticed by Joe Perches. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/key/af_key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index cf77930ee516..345019345f09 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -2072,7 +2072,7 @@ static int pfkey_xfrm_policy2msg(struct sk_buff *skb, struct xfrm_policy *xp, in
rq->sadb_x_ipsecrequest_proto = t->id.proto;
if ((mode = pfkey_mode_from_xfrm(t->mode)) < 0)
return -EINVAL;
- mode = pfkey_mode_from_xfrm(t->mode);
+ rq->sadb_x_ipsecrequest_mode = mode;
rq->sadb_x_ipsecrequest_level = IPSEC_LEVEL_REQUIRE;
if (t->reqid)
rq->sadb_x_ipsecrequest_level = IPSEC_LEVEL_UNIQUE;