af_key: Fix selector family initialization.

This propagates the xfrm_user fix made in commit
bcf0dda8d2 ("[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>
This commit is contained in:
Kazunori MIYAZAWA 2008-05-21 13:26:11 -07:00 committed by David S. Miller
parent d8ac48d4cb
commit 4da5105687
1 changed files with 1 additions and 1 deletions

View File

@ -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]) {