add additional fallback case

This commit is contained in:
Jason Rhinelander 2022-05-31 16:32:00 -03:00
parent d63d535d6b
commit 98e08591d0
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,24 @@
From: Jeff <jeff@lokinet.io>
Date: Tue, 31 May 2022 15:23:36 -0400
Subject: add additional fallback case
---
llarp/link/server.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/llarp/link/server.cpp b/llarp/link/server.cpp
index 44ac8b4..528b9d3 100644
--- a/llarp/link/server.cpp
+++ b/llarp/link/server.cpp
@@ -159,6 +159,11 @@ namespace llarp
// we do not have our claimed ip, nat or something?
m_ourAddr = *maybe;
}
+ else if (auto maybe = net::AllInterfaces(SockAddr{"0.0.0.0"}))
+ {
+ // one last fallback
+ m_ourAddr = *maybe;
+ }
else
return false; // the ultimate failure case
}

View File

@ -1 +1,2 @@
0007-Pass-debian-version-as-GIT_VERSION.patch
0002-add-additional-fallback-case.patch