aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nft_ct.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2022-06-23 15:05:13 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2022-07-11 16:40:46 +0200
commitffb3d9a30cc67a59865f50ae22e2496a5d0025eb (patch)
tree48eaf2da83e196d79a0a7ff1530681e5f48d7748 /net/netfilter/nft_ct.c
parent7278b3c1e4ebf6f9c4cda07600f19824857c81fe (diff)
downloadlinux-ffb3d9a30cc67a59865f50ae22e2496a5d0025eb.tar.gz
netfilter: nf_tables: use correct integer types
Sparse tool complains about mixing of different endianess types, so use the correct ones. Add type casts where needed. objdiff shows no changes except in nft_tunnel (type is changed). Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_ct.c')
-rw-r--r--net/netfilter/nft_ct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c
index d8e1614918a13c..b04995c3e17f12 100644
--- a/net/netfilter/nft_ct.c
+++ b/net/netfilter/nft_ct.c
@@ -204,12 +204,12 @@ static void nft_ct_get_eval(const struct nft_expr *expr,
case NFT_CT_SRC_IP:
if (nf_ct_l3num(ct) != NFPROTO_IPV4)
goto err;
- *dest = tuple->src.u3.ip;
+ *dest = (__force __u32)tuple->src.u3.ip;
return;
case NFT_CT_DST_IP:
if (nf_ct_l3num(ct) != NFPROTO_IPV4)
goto err;
- *dest = tuple->dst.u3.ip;
+ *dest = (__force __u32)tuple->dst.u3.ip;
return;
case NFT_CT_SRC_IP6:
if (nf_ct_l3num(ct) != NFPROTO_IPV6)