aboutsummaryrefslogtreecommitdiffstats
path: root/net/key/af_key.c
diff options
context:
space:
mode:
authorKazunori MIYAZAWA <kazunori@miyazawa.org>2008-05-21 13:26:11 -0700
committerDavid S. Miller <davem@davemloft.net>2008-05-21 13:26:11 -0700
commit4da5105687e0993a3bbdcffd89b2b94d9377faab (patch)
treebd6a67ec275f11f633224aa683e4102437a2d646 /net/key/af_key.c
parentd8ac48d4cbae0cc59b7784399292fbda3e231be3 (diff)
downloadkernel_samsung_crespo-4da5105687e0993a3bbdcffd89b2b94d9377faab.zip
kernel_samsung_crespo-4da5105687e0993a3bbdcffd89b2b94d9377faab.tar.gz
kernel_samsung_crespo-4da5105687e0993a3bbdcffd89b2b94d9377faab.tar.bz2
af_key: Fix selector family initialization.
This propagates the xfrm_user fix made in commit bcf0dda8d2408fe1c1040cdec5a98e5fcad2ac72 ("[XFRM]: xfrm_user: fix selector family initialization") Based upon a bug report from, and tested by, Alan Swanson. Signed-off-by: Kazunori MIYAZAWA <kazunori@miyazawa.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/key/af_key.c')
-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 9e7236f..9bba7ac 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1251,7 +1251,7 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct sadb_msg *hdr,
x->sel.prefixlen_s = addr->sadb_address_prefixlen;
}
- if (x->props.mode == XFRM_MODE_TRANSPORT)
+ if (!x->sel.family)
x->sel.family = x->props.family;
if (ext_hdrs[SADB_X_EXT_NAT_T_TYPE-1]) {