X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_auth.c;h=04674e8dc9e8ff5758844e665c3ceb5fe7033741;hb=995444c4f96bafecf7fb5d59510b3034459cf85c;hp=f309a40d8d6f94d066943e68cd1dd1256102210a;hpb=21184674b38ea1da87588de97dab076c9b9e4a81;p=tinc diff --git a/src/protocol_auth.c b/src/protocol_auth.c index f309a40d..04674e8d 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -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)); }