Commit:     4a4b6271a8df417e328aed4c8a7e04e0b282207e
Parent:     3516ffb0fef710749daf288c0fe146503e0cf9d4
Author:     Joy Latten <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 2 19:25:43 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 19:42:29 2007 -0700

    [PF_KEY]: Fix ipsec not working in 2.6.23-rc1-git10
    Although an ipsec SA was established, kernel couldn't seem to find it.
    I think since we are now using "x->" instead of "family" in
    the xfrm_selector_match() called in xfrm_state_find(), af_key needs to
    set this field too, just as xfrm_user.
    In af_key.c, x-> only gets set when there's an
    ext_hdrs[SADB_EXT_ADDRESS_PROXY-1] which I think is for tunnel.
    I think pfkey needs to also set the x-> field when it is 0.
    Tested with below patch, and ipsec worked when using pfkey.
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/key/af_key.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/key/af_key.c b/net/key/af_key.c
index 7b0a95a..5502df1 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1206,6 +1206,9 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct 
sadb_msg *hdr,
                x->sel.prefixlen_s = addr->sadb_address_prefixlen;
+       if (!x->
+               x-> = x->;
        if (ext_hdrs[SADB_X_EXT_NAT_T_TYPE-1]) {
                struct sadb_x_nat_t_type* n_type;
                struct xfrm_encap_tmpl *natt;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to