diff --git a/I2NPProtocol.cpp b/I2NPProtocol.cpp index 425668c3..1b2d0317 100644 --- a/I2NPProtocol.cpp +++ b/I2NPProtocol.cpp @@ -102,7 +102,7 @@ namespace i2p { RAND_bytes ((uint8_t *)&msgID, 4); htobe32buf (buf + DELIVERY_STATUS_MSGID_OFFSET, msgID); - htobe64buf (buf + DELIVERY_STATUS_TIMESTAMP_OFFSET, I2PD_NET_ID); // netID = 2 + htobe64buf (buf + DELIVERY_STATUS_TIMESTAMP_OFFSET, I2PD_NET_ID); } m->len += DELIVERY_STATUS_SIZE; m->FillI2NPMessageHeader (eI2NPDeliveryStatus); diff --git a/NetDb.cpp b/NetDb.cpp index 1c44c7f8..96d402b9 100644 --- a/NetDb.cpp +++ b/NetDb.cpp @@ -615,7 +615,7 @@ namespace data uint8_t flag = buf[64]; LogPrint (eLogDebug, "NetDb: DatabaseLookup for ", key, " recieved flags=", (int)flag); uint8_t lookupType = flag & DATABASE_LOOKUP_TYPE_FLAGS_MASK; - const uint8_t * excluded = buf + 65; + uint8_t * excluded = buf + 65; uint32_t replyTunnelID = 0; if (flag & DATABASE_LOOKUP_DELIVERY_FLAG) //reply to tunnel { @@ -671,7 +671,12 @@ namespace data lookupType == DATABASE_LOOKUP_TYPE_NORMAL_LOOKUP)) { auto leaseSet = FindLeaseSet (ident); - if (leaseSet && !leaseSet->IsExpired ()) // we don't send back our LeaseSets + if (!leaseSet) + { + // no lease set found + LogPrint(eLogDebug, "NetDb: requested LeaseSet not found ident=", ident); + } + else if (leaseSet->IsExpired ()) // we don't send back our LeaseSets { LogPrint (eLogDebug, "NetDb: requested LeaseSet ", key, " found"); replyMsg = CreateDatabaseStoreMsg (leaseSet);