- if(!c->config_tree) {
- init_configuration(&c->config_tree);
- if(!read_host_config(c->config_tree, c->name))
- return false;
+ if(!node_get_config(mesh, n, &config, &in)) {
+ return false;
+ }
+
+ packmsg_skip_element(&in); /* submesh */
+ packmsg_get_int32(&in); /* devclass */
+ packmsg_get_bool(&in); /* blacklisted */
+
+ const void *key;
+ uint32_t len = packmsg_get_bin_raw(&in, &key);
+
+ if(len != 32) {
+ config_free(&config);
+ return false;
+ }
+
+ n->ecdsa = ecdsa_set_public_key(key);
+
+ // While we are at it, read known address information
+ if(!n->canonical_address) {
+ n->canonical_address = packmsg_get_str_dup(&in);
+ } else {
+ packmsg_skip_element(&in);
+ }
+
+ // Append any known addresses in the config file to the list we currently have
+ uint32_t known_count = 0;
+
+ for(uint32_t i = 0; i < 5; i++) {
+ if(n->recent[i].sa.sa_family) {
+ known_count++;
+ }