Patch: initialise device.peers.empty
Laura Zelenku
laura.zelenku at wandera.com
Thu Feb 25 09:50:14 UTC 2021
Hi devs,
in some custom unit test for wireguard go I’m experiencing failed tests because “device.peers.empty” contains default “false” value right after device creation. Please apply following patch to initialise the value to true (empty = true) in device creation.
thanks
Laura
Index: device/device.go
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- device/device.go (revision 7a0fb5bbb1720fdd9404a4cf41920e24a46e0dad)
+++ device/device.go (date 1614241756159)
@@ -292,6 +292,7 @@
}
device.tun.mtu = int32(mtu)
device.peers.keyMap = make(map[NoisePublicKey]*Peer)
+ device.peers.empty.Set(true)
device.rate.limiter.Init()
device.indexTable.Init()
device.PopulatePools()
--
*IMPORTANT NOTICE*: This email, its attachments and any rights attaching
hereto are confidential and intended exclusively for the person to whom the
email is addressed. If you are not the intended recipient, do not read,
copy, disclose or use the contents in any way. Wandera accepts no liability
for any loss, damage or consequence resulting directly or indirectly from
the use of this email and attachments.
More information about the WireGuard
mailing list