diff --git a/src/service/transport/gnunet-service-transport.c b/src/service/transport/gnunet-service-transport.c index 50c3c07a7..5f6aec71a 100644 --- a/src/service/transport/gnunet-service-transport.c +++ b/src/service/transport/gnunet-service-transport.c @@ -9440,7 +9440,6 @@ static void handle_dv_learn (void *cls, const struct TransportDVLearnMessage *dvl) { struct CommunicatorMessageContext *cmc = cls; - enum GNUNET_TRANSPORT_CommunicatorCharacteristics cc; int bi_hop; uint16_t nhops; uint16_t bi_history; @@ -9488,9 +9487,15 @@ handle_dv_learn (void *cls, const struct TransportDVLearnMessage *dvl) } GNUNET_assert (CT_COMMUNICATOR == cmc->tc->type); - cc = cmc->tc->details.communicator.cc; - bi_hop = (GNUNET_TRANSPORT_CC_RELIABLE == - cc); // FIXME: add bi-directional flag to cc? + { + struct Neighbour *n = lookup_neighbour (&cmc->im.sender); + + /* The last hop is bidirectional if we can send to it directly. That + does not depend on the communicator being reliable: UDP is not, and + a queue to the sender works both ways all the same. */ + bi_hop = ( (NULL != n) && + (NULL != n->queue_head) ) ? GNUNET_YES : GNUNET_NO; + } in_time = GNUNET_TIME_absolute_get (); /* continue communicator here, everything else can happen asynchronous! */