If we got a packet that's meant to be relayed, don't call
sptps_send_data() if we don't have a valid key yet for the desination
node, but do keep trying to get a working connection to that node. Based
on a patch from thorkill.
/* If we're not the final recipient, relay the packet. */
if(to != myself) {
/* If we're not the final recipient, relay the packet. */
if(to != myself) {
- send_sptps_data(to, from, 0, data, len);
+ if(to->status.validkey) {
+ send_sptps_data(to, from, 0, data, len);
+ }
+
try_tx(to, true);
return true;
}
try_tx(to, true);
return true;
}