Merge pull request #249 from majestrate/enable-xi

enable exit info serialization
pull/248/head^2
Ryan Tharp 5 years ago committed by GitHub
commit 07f536efad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -23,9 +23,9 @@ namespace llarp
struct in6_addr netmask;
PubKey pubkey;
ExitInfo(const PubKey &pk, const nuint32_t &ipv4_exit) : IBEncodeMessage()
ExitInfo(const PubKey &pk, const nuint32_t &ipv4_exit) : IBEncodeMessage(),
pubkey(pk)
{
pubkey = pk;
memset(address.s6_addr, 0, 16);
address.s6_addr[11] = 0xff;
address.s6_addr[10] = 0xff;
@ -37,12 +37,11 @@ namespace llarp
{
}
ExitInfo(const ExitInfo &other) : IBEncodeMessage()
ExitInfo(const ExitInfo &other) : IBEncodeMessage(other.version),
pubkey(other.pubkey)
{
pubkey = other.pubkey;
memcpy(address.s6_addr, other.address.s6_addr, 16);
memcpy(netmask.s6_addr, other.netmask.s6_addr, 16);
version = other.version;
}
~ExitInfo();

@ -1041,8 +1041,7 @@ namespace llarp
if(ExitEnabled())
{
llarp::nuint32_t a = publicAddr.xtonl();
// TODO: enable this once the network can serialize xi
//_rc.exits.emplace_back(_rc.pubkey, a);
_rc.exits.emplace_back(_rc.pubkey, a);
llarp::LogInfo(
"Neato tehl33toh, You are a freaking exit relay. w00t!!!!! your "
"exit "

Loading…
Cancel
Save