X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_auth.c;h=52afa0969cffafbbc7342af42f1fda9c3ba5f6d3;hb=06a4a8c153407b690a3ce3f0e7fdaa8568ccb1a3;hp=f309a40d8d6f94d066943e68cd1dd1256102210a;hpb=21184674b38ea1da87588de97dab076c9b9e4a81;p=tinc diff --git a/src/protocol_auth.c b/src/protocol_auth.c index f309a40d..52afa096 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" @@ -672,7 +672,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)); }