if(bypass_security) {
if(!c->config_tree) {
- init_configuration(&c->config_tree);
+ c->config_tree = create_configuration();
}
c->allow_request = ACK;
}
if(!c->config_tree) {
- init_configuration(&c->config_tree);
+ c->config_tree = create_configuration();
if(!read_host_config(c->config_tree, c->name, false)) {
logger(DEBUG_ALWAYS, LOG_ERR, "Peer %s had unknown identity (%s)", c->hostname, c->name);
}
if(!get_config_int(lookup_config(c->config_tree, "Weight"), &c->estimated_weight)) {
- get_config_int(lookup_config(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));
}
if(tunnelserver) {
- for splay_each(subnet_t, s, myself->subnet_tree) {
+ for splay_each(subnet_t, s, &myself->subnet_tree) {
send_add_subnet(c, s);
}
return;
}
- for splay_each(node_t, n, node_tree) {
- for splay_each(subnet_t, s, n->subnet_tree) {
+ for splay_each(node_t, n, &node_tree) {
+ for splay_each(subnet_t, s, &n->subnet_tree) {
send_add_subnet(c, s);
}
- for splay_each(edge_t, e, n->edge_tree) {
+ for splay_each(edge_t, e, &n->edge_tree) {
send_add_edge(c, e);
}
}
n->mtu = mtu;
}
- if(get_config_int(lookup_config(config_tree, "PMTU"), &mtu) && mtu < n->mtu) {
+ if(get_config_int(lookup_config(&config_tree, "PMTU"), &mtu) && mtu < n->mtu) {
n->mtu = mtu;
}