mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-19 09:25:28 +00:00
Merge pull request #254 from neuroscr/master
Another grab bag of small tweaks/fixes
This commit is contained in:
commit
0eb105bef2
@ -1,6 +1,8 @@
|
||||
#!/bin/sh
|
||||
# copy a lokinet binary into this cluster
|
||||
cp ../../lokinet .
|
||||
# generate default config file
|
||||
../../lokinet -g lokinet.ini
|
||||
./lokinet -g lokinet.ini
|
||||
# make seed node
|
||||
./makenode.sh 1
|
||||
# establish bootstrap
|
||||
|
@ -149,7 +149,8 @@ llarp_ev_udp_sendto(struct llarp_udp_io *udp, const sockaddr *to,
|
||||
bool
|
||||
llarp_ev_add_tun(struct llarp_ev_loop *loop, struct llarp_tun_io *tun)
|
||||
{
|
||||
if(strcmp(tun->ifaddr, "") == 0 || strcmp(tun->ifaddr, "auto"))
|
||||
// llarp::LogInfo("ev creating tunnel ", tun->ifaddr, " on ", tun->ifname);
|
||||
if(strcmp(tun->ifaddr, "") == 0 || strcmp(tun->ifaddr, "auto") == 0)
|
||||
{
|
||||
std::string ifaddr = llarp::findFreePrivateRange();
|
||||
auto pos = ifaddr.find("/");
|
||||
@ -176,7 +177,7 @@ llarp_ev_add_tun(struct llarp_ev_loop *loop, struct llarp_tun_io *tun)
|
||||
tun->ifaddr);
|
||||
llarp::LogInfo("IfAddr autodetect: ", tun->ifaddr, "/", tun->netmask);
|
||||
}
|
||||
if(strcmp(tun->ifname, "") == 0 || strcmp(tun->ifname, "auto"))
|
||||
if(strcmp(tun->ifname, "") == 0 || strcmp(tun->ifname, "auto") == 0)
|
||||
{
|
||||
std::string ifname = llarp::findFreeLokiTunIfName();
|
||||
std::copy_n(ifname.begin(), std::min(sizeof(tun->ifname), ifname.size()),
|
||||
|
@ -337,7 +337,7 @@ namespace llarp
|
||||
return false;
|
||||
}
|
||||
f.seekg(0, std::ios::end);
|
||||
auto l = f.tellg();
|
||||
size_t l = f.tellg();
|
||||
if(l > sizeof(tmp))
|
||||
return false;
|
||||
f.seekg(0, std::ios::beg);
|
||||
|
@ -35,10 +35,10 @@ TEST_P(PubKeyString, fromstring)
|
||||
}
|
||||
|
||||
llarp::PubKey::Data empty = {};
|
||||
llarp::PubKey::Data full = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
llarp::PubKey::Data full = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}};
|
||||
|
||||
// clang-format off
|
||||
ToStringData toStringData[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user