[Openvpn-devel] [PATCH v2] Improve shuffling algorithm of connection list

2024-11-18 Thread Hurukawa2121
--- Improve shuffling algorithm of connection list This patch implements the Fisher-Yates shuffle algorithm to ensure that all permutations of the connection target list are generated with equal probability, eliminating biases present in the previous shuffling method. In the Fisher-Yates algo

[Openvpn-devel] [PATCH] Improve shuffling algorithm of connection list

2024-11-15 Thread Hurukawa2121
From: Hurukawa2121 --- Improve shuffling algorithm of connection list This patch implements the Fisher-Yates shuffle algorithm to ensure that all permutations of the connection target list are generated with equal probability, eliminating biases present in the previous shuffling method

[Openvpn-devel] [PATCH] Improve shuffling algorithm of connection list

2024-11-15 Thread Hurukawa2121
algorithm, there's only one way to obtain each permutation through these swaps, so all permutations occur with equal probability in theory. Signed-off-by: Hurukawa2121 src/openvpn/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvpn/init.c b/src/op

[Openvpn-devel] [PATCH] Improve shuffling algorithm of connection list

2024-11-15 Thread Hurukawa2121
From: Hurukawa2121 --- Improve shuffling algorithm of connection list This patch implements the Fisher-Yates shuffle algorithm to ensure that all permutations of the connection target list are generated with equal probability, eliminating biases present in the previous shuffling method

[Openvpn-devel] [PATCH] Improve shuffling algorithm of connection list

2024-11-15 Thread Hurukawa2121
From: Hurukawa2121 --- Improve shuffling algorithm of connection list This patch implements the Fisher-Yates shuffle algorithm to ensure that all permutations of the connection target list are generated with equal probability, eliminating biases present in the previous shuffling method

[Openvpn-devel] [PATCH] Improve shuffling algorithm of connection list

2024-11-15 Thread Hurukawa2121
algorithm, there's only one way to obtain each permutation through a series of element swaps, so all permutations occur with equal probability in theory. Signed-off-by: Hurukawa2121 src/openvpn/init.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git

[Openvpn-devel] [PATCH] Improve shuffling algorithm of connection list

2024-11-15 Thread Hurukawa2121
From: Hurukawa2121 --- Improve shuffling algorithm of connection list This patch implements the Fisher-Yates shuffle algorithm to ensure that all permutations of the connection target list are generated with equal probability, eliminating biases present in the previous shuffling method