Fix tinc 1.0.x daemons connecting when ExperimentalProtocol = yes.
authorGuus Sliepen <guus@tinc-vpn.org>
Tue, 19 Jul 2011 19:11:11 +0000 (21:11 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 19 Jul 2011 19:11:11 +0000 (21:11 +0200)
src/protocol_auth.c

index 4331e9451c161cd0c90354db08912990ae51c083..4eb61bdf115b59e5a602e7411702f422cb77dd08 100644 (file)
@@ -110,6 +110,9 @@ bool id_h(connection_t *c, char *request) {
                return send_ack(c);
        }
 
+       if(!experimental)
+               c->protocol_minor = 0;
+
        if(!c->config_tree) {
                init_configuration(&c->config_tree);
 
@@ -123,13 +126,10 @@ bool id_h(connection_t *c, char *request) {
                        if(!read_ecdsa_public_key(c))
                                return false;
        } else {
-               if(!ecdsa_active(&c->ecdsa))
+               if(c->protocol_minor && !ecdsa_active(&c->ecdsa))
                        c->protocol_minor = 1;
        }
 
-       if(!experimental)
-               c->protocol_minor = 0;
-
        c->allow_request = METAKEY;
 
        if(c->protocol_minor >= 2)