mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
more
This commit is contained in:
parent
fa1333b13b
commit
b462090e9c
|
@ -420,11 +420,11 @@ namespace llarp
|
||||||
}
|
}
|
||||||
|
|
||||||
huint32_t
|
huint32_t
|
||||||
TunEndpoint::ObtainIPForAddr(const byte_t *addr)
|
TunEndpoint::ObtainIPForAddr(const byte_t *a)
|
||||||
{
|
{
|
||||||
llarp_time_t now = Now();
|
llarp_time_t now = Now();
|
||||||
huint32_t nextIP = {0};
|
huint32_t nextIP = {0};
|
||||||
AlignedBuffer< 32 > ident(addr);
|
AlignedBuffer< 32 > ident(a);
|
||||||
{
|
{
|
||||||
// previously allocated address
|
// previously allocated address
|
||||||
auto itr = m_AddrToIP.find(ident);
|
auto itr = m_AddrToIP.find(ident);
|
||||||
|
@ -473,8 +473,8 @@ namespace llarp
|
||||||
++itr;
|
++itr;
|
||||||
}
|
}
|
||||||
// remap address
|
// remap address
|
||||||
m_IPToAddr[oldest.first] = addr;
|
m_IPToAddr[oldest.first] = ident;
|
||||||
m_AddrToIP[addr] = oldest.first;
|
m_AddrToIP[ident] = oldest.first;
|
||||||
nextIP = oldest.first;
|
nextIP = oldest.first;
|
||||||
|
|
||||||
// mark ip active
|
// mark ip active
|
||||||
|
|
Loading…
Reference in a new issue