]> git.meshlink.io Git - meshlink/commit
Fix segfault when two nodes that just joined a mesh want to autoconnect to each other.
authorGuus Sliepen <guus@meshlink.io>
Tue, 12 Aug 2014 20:03:32 +0000 (22:03 +0200)
committerGuus Sliepen <guus@meshlink.io>
Tue, 12 Aug 2014 20:03:32 +0000 (22:03 +0200)
commit98b9d73682733072d66d6db3beb15e7309805cf5
tree2c10352c4ff9cfd7a068f92bb12009fbc1f4c47e
parentf3dae7d32467b2ed28c1f62bfa2f5929f2611284
Fix segfault when two nodes that just joined a mesh want to autoconnect to each other.

In this case, we have not exchanged public keys yet. That should not be
a problem, but we blindly pass a NULL pointer to sptps_start() in this
case which blindly dereferences it. Fix sptps_start() by making sure no
arguments are NULL, and teach MeshLink to exchange keys between
reachable nodes when it tries to make a meta-connection.
src/protocol_auth.c
src/sptps.c