summaryrefslogtreecommitdiffstats
path: root/src/expr/xfrm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/xfrm.c')
-rw-r--r--src/expr/xfrm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/expr/xfrm.c b/src/expr/xfrm.c
index dc867a2..2585579 100644
--- a/src/expr/xfrm.c
+++ b/src/expr/xfrm.c
@@ -33,16 +33,16 @@ nftnl_expr_xfrm_set(struct nftnl_expr *e, uint16_t type,
switch(type) {
case NFTNL_EXPR_XFRM_KEY:
- memcpy(&x->key, data, sizeof(x->key));
+ memcpy(&x->key, data, data_len);
break;
case NFTNL_EXPR_XFRM_DIR:
- memcpy(&x->dir, data, sizeof(x->dir));
+ memcpy(&x->dir, data, data_len);
break;
case NFTNL_EXPR_XFRM_SPNUM:
- memcpy(&x->spnum, data, sizeof(x->spnum));
+ memcpy(&x->spnum, data, data_len);
break;
case NFTNL_EXPR_XFRM_DREG:
- memcpy(&x->dreg, data, sizeof(x->dreg));
+ memcpy(&x->dreg, data, data_len);
break;
default:
return -1;