mirror of
https://github.com/bol-van/zapret.git
synced 2025-04-17 04:22:59 +03:00
wireguard-mod : remove excessive wait_for_random_bytes
This commit is contained in:
parent
25188c052c
commit
5140622b66
@ -84,14 +84,9 @@ Index: WireGuard-0.0.20190123/src/noise.c
|
||||
+__le32 gen_trash(void)
|
||||
+{
|
||||
+ if (gtrash)
|
||||
+ {
|
||||
+ gtrash = gtrash*1103515243 + 12345;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ // first value is true random
|
||||
+ wait_for_random_bytes();
|
||||
+ get_random_bytes_wait(>rash, sizeof(gtrash));
|
||||
+ }
|
||||
+ return gtrash;
|
||||
+}
|
||||
|
@ -72,15 +72,10 @@ __le32 gtrash = 0;
|
||||
__le32 gen_trash(void)
|
||||
{
|
||||
if (gtrash)
|
||||
{
|
||||
gtrash = gtrash*1103515243 + 12345;
|
||||
}
|
||||
else
|
||||
{
|
||||
// first value is true random
|
||||
wait_for_random_bytes();
|
||||
get_random_bytes_wait(>rash, sizeof(gtrash));
|
||||
}
|
||||
return gtrash;
|
||||
}
|
||||
--------------------------------------
|
||||
@ -212,6 +207,7 @@ make clean оттуда все снесет, включая ваши модиф
|
||||
# opkg update
|
||||
# opkg install .... <зависимости>
|
||||
# opkg install *.ipk
|
||||
|
||||
# rmmod wireguard
|
||||
# kmodloader
|
||||
# dmesg | tail
|
||||
|
Loading…
x
Reference in New Issue
Block a user