]> git.meshlink.io Git - meshlink/commitdiff
free_connection_partially(): also reset remote protocol version infos
authorSven-Haegar Koch <haegar@sdinet.de>
Sun, 22 Apr 2012 01:44:28 +0000 (03:44 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 8 May 2012 14:20:21 +0000 (16:20 +0200)
The used remote protocol can change between two reconnects, aka if
the remote side has enabled/disabled for example their ExperimentalProtocols
setting.

src/connection.c

index 6fdd2bc4c5e413efba8e178a14a847b53db70c4f..29ad04ee789075672792f5c21ebb1838f1d47715 100644 (file)
@@ -82,6 +82,10 @@ void free_connection_partially(connection_t *c) {
                closesocket(c->socket);
 
        c->socket = -1;
+
+       c->protocol_major = 0;
+       c->protocol_minor = 0;
+       c->allow_request = 0;
 }
 
 void free_connection(connection_t *c) {