X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_auth.c;h=0904afd3d53ed71887886c5f48335b36fd98fa2b;hb=c35bfa18ec49439d4a028990fcf0ae6d8c4508a5;hp=f309a40d8d6f94d066943e68cd1dd1256102210a;hpb=21184674b38ea1da87588de97dab076c9b9e4a81;p=tinc diff --git a/src/protocol_auth.c b/src/protocol_auth.c index f309a40d..0904afd3 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -1,7 +1,7 @@ /* protocol_auth.c -- handle the meta-protocol, authentication Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2013 Guus Sliepen + 2000-2014 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -38,9 +38,9 @@ #include "netutl.h" #include "node.h" #include "prf.h" -#include "process.h" #include "protocol.h" #include "rsa.h" +#include "script.h" #include "sptps.h" #include "utils.h" #include "xalloc.h" @@ -379,7 +379,8 @@ bool id_h(connection_t *c, const char *request) { } if(experimental) - read_ecdsa_public_key(c); + if(!read_ecdsa_public_key(c)) + return false; } else { if(c->protocol_minor && !ecdsa_active(c->ecdsa)) c->protocol_minor = 1; @@ -672,7 +673,8 @@ bool send_ack(connection_t *c) { if(choice) c->options |= OPTION_CLAMP_MSS; - get_config_int(lookup_config(c->config_tree, "Weight"), &c->estimated_weight); + if(!get_config_int(lookup_config(c->config_tree, "Weight"), &c->estimated_weight)) + get_config_int(lookup_config(config_tree, "Weight"), &c->estimated_weight); return send_request(c, "%d %s %d %x", ACK, myport, c->estimated_weight, (c->options & 0xffffff) | (experimental ? (PROT_MINOR << 24) : 0)); }