Skip to content

Commit

Permalink
af_key: Fix selector family initialization.
Browse files Browse the repository at this point in the history
This propagates the xfrm_user fix made in commit
bcf0dda ("[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>
  • Loading branch information
Kazunori MIYAZAWA authored and davem330 committed May 21, 2008
1 parent d8ac48d commit 4da5105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down

0 comments on commit 4da5105

Please sign in to comment.