If you need to fetch less than 32 bits, round it up to 32 bits to make sure that it zeroes the remaining part of the register. This changes is required by concatenations. Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- net/netfilter/nf_tables_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/netfilter/nf_tables_core.c b/net/netfilter/nf_tables_core.c index b814b0c4..5feb409 100644 --- a/net/netfilter/nf_tables_core.c +++ b/net/netfilter/nf_tables_core.c @@ -54,11 +54,11 @@ static bool nft_payload_fast_eval(const struct nft_expr *expr, return false; if (priv->len == 2) - *(u16 *)dest = *(u16 *)ptr; + *dest = *(u16 *)ptr; else if (priv->len == 4) - *(u32 *)dest = *(u32 *)ptr; + *dest = *(u32 *)ptr; else - *(u8 *)dest = *(u8 *)ptr; + *dest = *(u8 *)ptr; return true; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html