4eaabf2e1cc1445c2d93d53b1c32d6451d3e9ee9
When receiving an INIT packet, the code was looking up existing links by address. However, in a mesh topology where each node has both client and server connections to peers, a client link created during initialization would be found when receiving an incoming INIT packet from that peer. This caused the code to try decrypting the INIT packet using the client link's crypto context, which failed because the session keys weren't properly established yet. The fix checks if the found link is a client link (is_server==0) and if so, treats the packet as a new INIT connection that needs to create a server-side link instead. Changed condition from: if (link==NULL) to: if (link==NULL || link->is_server==0)
…
…
Languages
C
63.6%
C++
17.3%
Kotlin
9.4%
HTML
6.6%
Python
1.2%
Other
1.7%