aboutsummaryrefslogtreecommitdiffstats
path: root/net/key
diff options
context:
space:
mode:
Diffstat (limited to 'net/key')
-rw-r--r--net/key/af_key.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 98b72f2024ff..652dd09ccd3a 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1096,17 +1096,11 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct sadb_msg *hdr,
1096 } 1096 }
1097 } 1097 }
1098 1098
1099 x->type = xfrm_get_type(proto, x->props.family); 1099 err = xfrm_init_state(x);
1100 if (x->type == NULL) { 1100 if (err)
1101 err = -ENOPROTOOPT;
1102 goto out;
1103 }
1104 if (x->type->init_state(x, NULL)) {
1105 err = -EINVAL;
1106 goto out; 1101 goto out;
1107 } 1102
1108 x->km.seq = hdr->sadb_msg_seq; 1103 x->km.seq = hdr->sadb_msg_seq;
1109 x->km.state = XFRM_STATE_VALID;
1110 return x; 1104 return x;
1111 1105
1112out: 1106out: