All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf] netfilter: conntrack: fix build on 32bit arches
@ 2019-04-13 21:24 Florian Westphal
  2019-04-13 23:03 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2019-04-13 21:24 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

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 <lkp@intel.com>
Fixes: 862ae3a4a07e4c22 ("netfilter: ctnetlink: don't use conntrack/expect object addresses as id")
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 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(-)

diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index a966e69d68d9..3c48d44d6fff 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -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);
 
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index f80fce25c673..805a277e456b 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -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
 }
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH nf] netfilter: conntrack: fix build on 32bit arches
  2019-04-13 21:24 [PATCH nf] netfilter: conntrack: fix build on 32bit arches Florian Westphal
@ 2019-04-13 23:03 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2019-04-13 23:03 UTC (permalink / raw)
  To: Florian Westphal; +Cc: netfilter-devel

On Sat, Apr 13, 2019 at 11:24:21PM +0200, Florian Westphal wrote:
> 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 <lkp@intel.com>
> Fixes: 862ae3a4a07e4c22 ("netfilter: ctnetlink: don't use conntrack/expect object addresses as id")
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
>  Pablo, feel free to squash this with 862ae3a4a07e4c22.

Squashed, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-13 23:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-13 21:24 [PATCH nf] netfilter: conntrack: fix build on 32bit arches Florian Westphal
2019-04-13 23:03 ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.