Clear connection options and status fields in free_connection_partially().
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 6 Oct 2012 19:05:02 +0000 (21:05 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 6 Oct 2012 19:05:02 +0000 (21:05 +0200)
commit0f53f489916eae57dd47b7c871295efb9bf02323
tree725369d3f44fb71694177c50ed1008135dacb6ef
parentc4940a5c888d85b4c477b6face5e9a618e64718d
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