mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-14 21:48:49 +00:00
netfilter: xt_NFQUEUE: remove modulo operations
Signed-off-by: Changli Gao <xiaosuo@gmail.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
e5fc9e7a66
commit
ca36181050
@ -72,10 +72,12 @@ nfqueue_tg_v1(struct sk_buff *skb, const struct xt_action_param *par)
|
|||||||
|
|
||||||
if (info->queues_total > 1) {
|
if (info->queues_total > 1) {
|
||||||
if (par->family == NFPROTO_IPV4)
|
if (par->family == NFPROTO_IPV4)
|
||||||
queue = hash_v4(skb) % info->queues_total + queue;
|
queue = (((u64) hash_v4(skb) * info->queues_total) >>
|
||||||
|
32) + queue;
|
||||||
#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
|
#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
|
||||||
else if (par->family == NFPROTO_IPV6)
|
else if (par->family == NFPROTO_IPV6)
|
||||||
queue = hash_v6(skb) % info->queues_total + queue;
|
queue = (((u64) hash_v6(skb) * info->queues_total) >>
|
||||||
|
32) + queue;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return NF_QUEUE_NR(queue);
|
return NF_QUEUE_NR(queue);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user