summaryrefslogtreecommitdiffstats
path: root/src/expr/masq.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/masq.c')
-rw-r--r--src/expr/masq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/expr/masq.c b/src/expr/masq.c
index 4be5a9c..e0565db 100644
--- a/src/expr/masq.c
+++ b/src/expr/masq.c
@@ -34,13 +34,13 @@ nftnl_expr_masq_set(struct nftnl_expr *e, uint16_t type,
switch (type) {
case NFTNL_EXPR_MASQ_FLAGS:
- memcpy(&masq->flags, data, sizeof(masq->flags));
+ memcpy(&masq->flags, data, data_len);
break;
case NFTNL_EXPR_MASQ_REG_PROTO_MIN:
- memcpy(&masq->sreg_proto_min, data, sizeof(masq->sreg_proto_min));
+ memcpy(&masq->sreg_proto_min, data, data_len);
break;
case NFTNL_EXPR_MASQ_REG_PROTO_MAX:
- memcpy(&masq->sreg_proto_max, data, sizeof(masq->sreg_proto_max));
+ memcpy(&masq->sreg_proto_max, data, data_len);
break;
}
return 0;