A REQ_KEY request from a node that wants our key can contain their key as
well. The node status was not set to dirty in this case, which could
prevent their key from being written to disk with the default settings, but
this actually always forgot to write the key to disk with storage policy
set to KEYS_ONLY.
logger(mesh, MESHLINK_ERROR, "Got bad %s from %s: %s", "REQ_PUBKEY", from->name, "invalid pubkey");
return true;
}
+
+ logger(mesh, MESHLINK_INFO, "Learned ECDSA public key from %s", from->name);
+ from->status.dirty = true;
+
+ if(!node_write_config(mesh, from, true)) {
+ // ignore
+ }
}
}