summaryrefslogtreecommitdiffstats
path: root/src/expr/tunnel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/tunnel.c')
-rw-r--r--src/expr/tunnel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/expr/tunnel.c b/src/expr/tunnel.c
index 677e968..b2b8d72 100644
--- a/src/expr/tunnel.c
+++ b/src/expr/tunnel.c
@@ -31,10 +31,10 @@ static int nftnl_expr_tunnel_set(struct nftnl_expr *e, uint16_t type,
switch(type) {
case NFTNL_EXPR_TUNNEL_KEY:
- tunnel->key = *((uint32_t *)data);
+ memcpy(&tunnel->key, data, sizeof(tunnel->key));
break;
case NFTNL_EXPR_TUNNEL_DREG:
- tunnel->dreg = *((uint32_t *)data);
+ memcpy(&tunnel->dreg, data, sizeof(tunnel->dreg));
break;
default:
return -1;