From a520fb379bc0751a150c2306be0e908dddd8abe4 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Wed, 14 Nov 2018 16:02:36 -0500 Subject: [PATCH] use rxid instead of txid for exits --- llarp/transit_hop.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/llarp/transit_hop.cpp b/llarp/transit_hop.cpp index bfc2d7bd1..8ad5aa5c2 100644 --- a/llarp/transit_hop.cpp +++ b/llarp/transit_hop.cpp @@ -154,7 +154,7 @@ namespace llarp const llarp::routing::ObtainExitMessage* msg, llarp_router* r) { if(msg->Verify(&r->crypto) - && r->exitContext.ObtainNewExit(msg->I, info.txID, msg->E != 0)) + && r->exitContext.ObtainNewExit(msg->I, info.rxID, msg->E != 0)) { llarp::routing::GrantExitMessage grant; grant.S = NextSeqNo(); @@ -177,8 +177,8 @@ namespace llarp TransitHop::HandleCloseExitMessage( const llarp::routing::CloseExitMessage* msg, llarp_router* r) { - llarp::routing::DataDiscardMessage discard(info.txID, msg->S); - auto ep = r->exitContext.FindEndpointForPath(info.txID); + llarp::routing::DataDiscardMessage discard(info.rxID, msg->S); + auto ep = r->exitContext.FindEndpointForPath(info.rxID); if(ep && msg->Verify(&r->crypto, ep->PubKey())) { ep->Close(); @@ -211,7 +211,7 @@ namespace llarp if(!msg->Verify(&r->crypto, ep->PubKey())) return false; - if(ep->UpdateLocalPath(info.txID)) + if(ep->UpdateLocalPath(info.rxID)) { llarp::routing::UpdateExitVerifyMessage reply; reply.T = msg->T; @@ -220,7 +220,7 @@ namespace llarp } } // on fail tell message was discarded - llarp::routing::DataDiscardMessage discard(info.txID, msg->S); + llarp::routing::DataDiscardMessage discard(info.rxID, msg->S); return SendRoutingMessage(&discard, r); } @@ -248,14 +248,14 @@ namespace llarp TransitHop::HandleTransferTrafficMessage( const llarp::routing::TransferTrafficMessage* msg, llarp_router* r) { - auto endpoint = r->exitContext.FindEndpointForPath(info.txID); + auto endpoint = r->exitContext.FindEndpointForPath(info.rxID); if(endpoint && msg->Verify(&r->crypto, endpoint->PubKey())) { if(endpoint->SendOutboundTraffic(llarp::ConstBuffer(msg->X))) return true; } // discarded - llarp::routing::DataDiscardMessage discard(info.txID, msg->S); + llarp::routing::DataDiscardMessage discard(info.rxID, msg->S); return SendRoutingMessage(&discard, r); }