From 22d76f7454a25beaca47fa37db3e6ab0d6797d01 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Fri, 8 Mar 2019 17:19:55 -0800 Subject: [PATCH 1/4] additional macos DNS fixes --- llarp/dns/message.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llarp/dns/message.cpp b/llarp/dns/message.cpp index f1882f1be..6c9809730 100644 --- a/llarp/dns/message.cpp +++ b/llarp/dns/message.cpp @@ -157,7 +157,7 @@ namespace llarp { if(questions.size()) { - hdr_fields |= flags_QR | flags_AA; + hdr_fields |= flags_QR | flags_AA | flags_RA; const auto& question = questions[0]; ResourceRecord rec; rec.rr_name = question.qname; @@ -175,7 +175,7 @@ namespace llarp { if(questions.size()) { - hdr_fields |= flags_QR | flags_AA; + hdr_fields |= flags_QR | flags_AA | flags_RA; const auto& question = questions[0]; answers.emplace_back(); auto& rec = answers.back(); From b525272f241901aeea1e9ad8278326defa7f5002 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Mon, 11 Mar 2019 19:54:01 -0700 Subject: [PATCH 2/4] add router docker file --- docker/router.Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docker/router.Dockerfile diff --git a/docker/router.Dockerfile b/docker/router.Dockerfile new file mode 100644 index 000000000..1104d6e81 --- /dev/null +++ b/docker/router.Dockerfile @@ -0,0 +1,18 @@ +FROM ubuntu:latest + +RUN apt update && \ + apt install -y build-essential cmake git libcap-dev curl ninja-build + +WORKDIR /src/ +COPY . /src/ + +# 12p/24l cores takes 8gb +ARG BIG_AND_FAST="false" + +RUN if [ "false$BIG_AND_FAST" = "false" ] ; then make ; else make NINJA=ninja ; fi +RUN find . -name lokinet +RUN ./lokinet -g -f +RUN ./lokinet-bootstrap http://206.81.100.174/n-st-1.signed + +CMD ["./lokinet"] +EXPOSE 1090/udp From 8ada001bc9a12ed385145235338c56a4f71aac11 Mon Sep 17 00:00:00 2001 From: michael-loki Date: Tue, 12 Mar 2019 10:13:33 +0000 Subject: [PATCH 3/4] Remove negative thread safety warning flag This is experimental, and has a bunch of false positives. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 249042e41..74e9ffd5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,7 +74,7 @@ add_compile_options($<$:-fpermissive>) add_compile_options(-Wno-unused-function -Wno-deprecated-declarations -Wno-unknown-pragmas) if (USING_CLANG) - add_compile_options(-Wthread-safety -Wthread-safety-negative) + add_compile_options(-Wthread-safety) endif() if (WITH_COVERAGE) From 8dfe72cbc9eb0c7ed25d8aed41e0567734968985 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 14 Mar 2019 00:20:37 +0000 Subject: [PATCH 4/4] Fix deadlock in profiling --- llarp/profiling.cpp | 1 - llarp/profiling.hpp | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llarp/profiling.cpp b/llarp/profiling.cpp index da2a1164d..92164da32 100644 --- a/llarp/profiling.cpp +++ b/llarp/profiling.cpp @@ -190,7 +190,6 @@ namespace llarp if(!profile.BDecode(buf)) return false; RouterID pk = k.base; - absl::WriterMutexLock l(&m_ProfilesMutex); return m_Profiles.emplace(pk, profile).second; } diff --git a/llarp/profiling.hpp b/llarp/profiling.hpp index e94d12087..d9db5caf9 100644 --- a/llarp/profiling.hpp +++ b/llarp/profiling.hpp @@ -69,13 +69,14 @@ namespace llarp MarkPathSuccess(path::Path* p) LOCKS_EXCLUDED(m_ProfilesMutex); void - Tick(); + Tick() LOCKS_EXCLUDED(m_ProfilesMutex); bool BEncode(llarp_buffer_t* buf) const override LOCKS_EXCLUDED(m_ProfilesMutex); bool - DecodeKey(const llarp_buffer_t& k, llarp_buffer_t* buf) override; + DecodeKey(const llarp_buffer_t& k, llarp_buffer_t* buf) override + SHARED_LOCKS_REQUIRED(m_ProfilesMutex); bool Load(const char* fname) LOCKS_EXCLUDED(m_ProfilesMutex);