flip order of parameters so it works

pull/1570/head
Jeff Becker 3 years ago
parent 3d09b94590
commit 324498fe9a
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -45,7 +45,7 @@ namespace llarp
void
SendServerMessageBufferTo(
const SockAddr& from, const SockAddr& to, llarp_buffer_t buf) override
const SockAddr& to, const SockAddr& from, llarp_buffer_t buf) override
{
net::IPPacket pkt;
@ -76,15 +76,11 @@ namespace llarp
ptr += 2;
std::copy_n(buf.base, buf.sz, ptr);
/// queue ip packet write
const IpAddress remoteIP{from};
const IpAddress localIP{to};
hdr->check = 0;
hdr->check = net::ipchksum(pkt.buf, 20);
pkt.sz = 28 + buf.sz;
m_Endpoint->HandleWriteIPPacket(
pkt.ConstBuffer(), net::ExpandV4(remoteIP.toIP()), net::ExpandV4(localIP.toIP()), 0);
pkt.ConstBuffer(), net::ExpandV4(from.asIPv4()), net::ExpandV4(to.asIPv4()), 0);
}
};

Loading…
Cancel
Save