Home
last modified time | relevance | path

Searched refs:uctx (Results 1 – 3 of 3) sorted by relevance

/net/key/
Daf_key.c470 struct xfrm_user_sec_ctx *uctx = NULL; in pfkey_sadb2xfrm_user_sec_ctx() local
473 uctx = kmalloc((sizeof(*uctx)+ctx_size), gfp); in pfkey_sadb2xfrm_user_sec_ctx()
475 if (!uctx) in pfkey_sadb2xfrm_user_sec_ctx()
478 uctx->len = pfkey_sec_ctx_len(sec_ctx); in pfkey_sadb2xfrm_user_sec_ctx()
479 uctx->exttype = sec_ctx->sadb_x_sec_exttype; in pfkey_sadb2xfrm_user_sec_ctx()
480 uctx->ctx_doi = sec_ctx->sadb_x_ctx_doi; in pfkey_sadb2xfrm_user_sec_ctx()
481 uctx->ctx_alg = sec_ctx->sadb_x_ctx_alg; in pfkey_sadb2xfrm_user_sec_ctx()
482 uctx->ctx_len = sec_ctx->sadb_x_ctx_len; in pfkey_sadb2xfrm_user_sec_ctx()
483 memcpy(uctx + 1, sec_ctx + 1, in pfkey_sadb2xfrm_user_sec_ctx()
484 uctx->ctx_len); in pfkey_sadb2xfrm_user_sec_ctx()
[all …]
/net/xfrm/
Dxfrm_user.c107 struct xfrm_user_sec_ctx *uctx; in verify_sec_ctx_len() local
112 uctx = nla_data(rt); in verify_sec_ctx_len()
113 if (uctx->len > nla_len(rt) || in verify_sec_ctx_len()
114 uctx->len != (sizeof(struct xfrm_user_sec_ctx) + uctx->ctx_len)) in verify_sec_ctx_len()
815 struct xfrm_user_sec_ctx *uctx; in copy_sec_ctx() local
817 int ctx_size = sizeof(*uctx) + s->ctx_len; in copy_sec_ctx()
823 uctx = nla_data(attr); in copy_sec_ctx()
824 uctx->exttype = XFRMA_SEC_CTX; in copy_sec_ctx()
825 uctx->len = ctx_size; in copy_sec_ctx()
826 uctx->ctx_doi = s->ctx_doi; in copy_sec_ctx()
[all …]
Dxfrm_state.c1450 struct xfrm_user_sec_ctx *uctx; in clone_security() local
1451 int size = sizeof(*uctx) + security->ctx_len; in clone_security()
1454 uctx = kmalloc(size, GFP_KERNEL); in clone_security()
1455 if (!uctx) in clone_security()
1458 uctx->exttype = XFRMA_SEC_CTX; in clone_security()
1459 uctx->len = size; in clone_security()
1460 uctx->ctx_doi = security->ctx_doi; in clone_security()
1461 uctx->ctx_alg = security->ctx_alg; in clone_security()
1462 uctx->ctx_len = security->ctx_len; in clone_security()
1463 memcpy(uctx + 1, security->ctx_str, security->ctx_len); in clone_security()
[all …]