This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
}
static bool send_initial_sptps_data(void *handle, uint8_t type, const void *data, size_t len) {
}
static bool send_initial_sptps_data(void *handle, uint8_t type, const void *data, size_t len) {
/* REQ_KEY is overloaded to allow arbitrary requests to be routed between two nodes. */
static bool req_key_ext_h(meshlink_handle_t *mesh, connection_t *c, const char *request, node_t *from, int reqno) {
/* REQ_KEY is overloaded to allow arbitrary requests to be routed between two nodes. */
static bool req_key_ext_h(meshlink_handle_t *mesh, connection_t *c, const char *request, node_t *from, int reqno) {
if(reqno)
return req_key_ext_h(mesh, c, request, from, reqno);
if(reqno)
return req_key_ext_h(mesh, c, request, from, reqno);
- /* No, just send our key back */
- send_ans_key(mesh, from);
+ /* This should never happen. Ignore it, unless it came directly from the connected peer, in which case we disconnect. */
+ return from->connection != c;
} else {
if(!to->status.reachable) {
logger(mesh, MESHLINK_WARNING, "Got %s from %s destination %s which is not reachable",
} else {
if(!to->status.reachable) {
logger(mesh, MESHLINK_WARNING, "Got %s from %s destination %s which is not reachable",