Document Weight and also allow it to be set from tinc.conf.

This commit is contained in:
Guus Sliepen 2014-01-29 17:32:18 +01:00
parent 2e318f3799
commit 995444c4f9
3 changed files with 14 additions and 1 deletions

View file

@ -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));
}