[PATCH net] netfilter: nf_conncount: fix wrong variable type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'keylen' is supposed to be unsigned int, not u8, so fix it.

Fixes: 2ba39118c10a ("netfilter: nf_conncount: Move locking into count_tree()")
Fixes: c80f10bc973a ("netfilter: nf_conncount: speculative garbage collection on empty lists")
Signed-off-by: Yunjian Wang <wangyunjian@xxxxxxxxxx>
---
 net/netfilter/nf_conncount.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/netfilter/nf_conncount.c b/net/netfilter/nf_conncount.c
index 8715617b02fe..4554f4b093fa 100644
--- a/net/netfilter/nf_conncount.c
+++ b/net/netfilter/nf_conncount.c
@@ -321,7 +321,7 @@ insert_tree(struct net *net,
 	struct nf_conncount_rb *rbconn;
 	struct nf_conncount_tuple *conn;
 	unsigned int count = 0, gc_count = 0;
-	u8 keylen = data->keylen;
+	unsigned int keylen = data->keylen;
 	bool do_gc = true;
 
 	spin_lock_bh(&nf_conncount_locks[hash]);
@@ -403,7 +403,7 @@ count_tree(struct net *net,
 	struct rb_node *parent;
 	struct nf_conncount_rb *rbconn;
 	unsigned int hash;
-	u8 keylen = data->keylen;
+	unsigned int keylen = data->keylen;
 
 	hash = jhash2(key, data->keylen, conncount_rnd) % CONNCOUNT_SLOTS;
 	root = &data->root[hash];
-- 
2.33.0





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux