]> git.meshlink.io Git - meshlink/commit
Clear connection options and status fields in free_connection_partially().
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 6 Oct 2012 19:15:19 +0000 (21:15 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 6 Oct 2012 19:15:19 +0000 (21:15 +0200)
commit86116bb022f0b885638ff9ba21b359fc9f55286a
tree3d3384dfea27cd3b9a88611653b2cd7f8f77e291
parentef9358c0d616c5ff3391c8ec3da5d357286a4457
Clear connection options and status fields in free_connection_partially().

Most fields should be zero when reusing a connection. In particular, when an
outgoing connection to a node which is reachable on more than one address is
made, the second connection to that node will have status.encryptout set but
outctx will be NULL, causing a NULL pointer dereference when
EVP_EncryptUpdate() is called in send_meta() when it shouldn't.
src/connection.c
src/connection.h