netfilter: conntrack: fix build on 32bit arches
Subsystems (2)
Florian Westphal
maintainerPATCH 1/1 netfilter: conntrack: fix build on 32bit arches
don't use hsiphash, it needs a hsiphash_key_t argument:
error: passing argument 3 of 'hsiphash' from incompatible pointer type
Reported-by kbuild test robot <[email protected]>
Fixes 862ae3a4a07e4c22 ("netfilter: ctnetlink: don't use conntrack/expect object addresses as id")
Signed-off-by Florian Westphal <[email protected]>
---
Pablo, feel free to squash this with 862ae3a4a07e4c22.
net/netfilter/nf_conntrack_core.c | 8 ++------ net/netfilter/nf_conntrack_netlink.c | 6 ++---- 2 files changed, 4 insertions(+), 10 deletions(-)
net/netfilter/nf_conntrack_core.c +2 -6
@@ -474,17 +474,13 @@ u32 nf_ct_get_id(const struct nf_conn *ct) a = (unsigned long )ct; b = (unsigned long )ct->master ^net_hash_mix (nf_ct_net (ct)); c = (unsigned long )ct->ext; - + d = (unsigned long )siphash (&ct->tuplehash,sizeof (ct->tuplehash), + &ct_id_seed);#ifdef CONFIG_64BIT - d =siphash (&ct->tuplehash,sizeof (ct->tuplehash), &ct_id_seed); -return siphash_4u64 ((u64 )a, (u64 )b, (u64 )c, (u64 )d, &ct_id_seed);#else - d =hsiphash (&ct->tuplehash,sizeof (ct->tuplehash), &ct_id_seed); -return siphash_4u32 ((u32 )a, (u32 )b, (u32 )c, (u32 )d, &ct_id_seed);#endif - }EXPORT_SYMBOL_GPL (nf_ct_get_id);
net/netfilter/nf_conntrack_netlink.c +2 -4
@@ -2706,13 +2706,11 @@ static __be32 nf_expect_get_id(const struct nf_conntrack_expect *exp) a = (unsigned long )exp; b = (unsigned long )exp->helper; c = (unsigned long )exp->master; -#ifdef CONFIG_64BIT - d =siphash (&exp->tuple,sizeof (exp->tuple), &exp_id_seed); + d = (unsigned long )siphash (&exp->tuple,sizeof (exp->tuple), &exp_id_seed); +#ifdef CONFIG_64BIT return (__force __be32 )siphash_4u64 ((u64 )a, (u64 )b, (u64 )c, (u64 )d, &exp_id_seed);#else - d =hsiphash (&exp->tuple,sizeof (exp->tuple), &exp_id_seed); -return (__force __be32 )siphash_4u32 ((u32 )a, (u32 )b, (u32 )c, (u32 )d, &exp_id_seed);#endif }
Signature · 1 line
2.21.0
Pablo Neira Ayuso
maintainerQuoted 8 lines · Florian Westphal
don't use hsiphash, it needs a
hsiphash_key_targument:
error: passing argument 3 of 'hsiphash' from incompatible pointer typeReported-by kbuild test robot <[email protected]>Fixes 862ae3a4a07e4c22 ("netfilter: ctnetlink: don't use conntrack/expect object addresses as id")Signed-off-by Florian Westphal <[email protected]>---
Pablo, feel free to squash this with862ae3a4a07e4c22.
Squashed, thanks.