diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2023-02-07 13:30:37 +0100 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2023-10-05 15:10:34 +0200 |
commit | 6e308651c441cbf8763c67cc099c538c333c2872 (patch) | |
tree | 7d4ddc4737c3a19fcb560fc33fe9bfbea56b7f35 /src/netbase.cpp | |
parent | c42ded3d9bda8b273780a4a81490bbf1b9e9c261 (diff) |
net: move IsReachable() code to netbase and encapsulate it
`vfLimited`, `IsReachable()`, `SetReachable()` need not be in the `net`
module. Move them to `netbase` because they will be needed in
`LookupSubNet()` to possibly flip the result to CJDNS (if that network
is reachable).
In the process, encapsulate them in a class.
`NET_UNROUTABLE` and `NET_INTERNAL` are no longer ignored when adding
or removing reachable networks. This was unnecessary.
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r-- | src/netbase.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp index ca1a80d72f..16b5e1c70d 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -32,6 +32,8 @@ bool fNameLookup = DEFAULT_NAME_LOOKUP; std::chrono::milliseconds g_socks5_recv_timeout = 20s; static std::atomic<bool> interruptSocks5Recv(false); +ReachableNets g_reachable_nets; + std::vector<CNetAddr> WrappedGetAddrInfo(const std::string& name, bool allow_lookup) { addrinfo ai_hint{}; |