more logging

pull/66/head
Jeff Becker 6 years ago
parent 355d09e22b
commit 0889071514
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -255,12 +255,23 @@ namespace llarp
const llarp::routing::TransferTrafficMessage* msg, llarp_router* r)
{
auto endpoint = r->exitContext.FindEndpointForPath(info.rxID);
if(endpoint && msg->Verify(&r->crypto, endpoint->PubKey()))
if(endpoint)
{
llarp::LogInfo("exit traffic");
if(endpoint->SendOutboundTraffic(llarp::ConstBuffer(msg->X)))
return true;
if(msg->Verify(&r->crypto, endpoint->PubKey()))
{
if(endpoint->SendOutboundTraffic(llarp::ConstBuffer(msg->X)))
return true;
else
llarp::LogError("failed to send outbound traffic for exit on ",
info);
}
else
{
llarp::LogError("bad signature on exit traffic on ", info);
}
}
else
llarp::LogError("No exit endpoint on ", info);
// discarded
llarp::routing::DataDiscardMessage discard(info.rxID, msg->S);
return SendRoutingMessage(&discard, r);

Loading…
Cancel
Save