aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2023-07-14 10:48:30 -0600
committerJon Atack <jon@atack.com>2023-07-19 11:49:27 -0600
commitfb4265747c9eb022d80c6f2988e574c689130348 (patch)
treedcf2a0c2b5cdd90fcc4df668d380454223c5daa8 /src/net.cpp
parent5ba73cd0ee1e661ec4d041ac8ae7a60cfd31f0c0 (diff)
Add and use CNetAddr::HasCJDNSPrefix() helper
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 654e0ac9fd..d76874b233 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -275,7 +275,7 @@ std::optional<CService> GetLocalAddrForPeer(CNode& node)
CService MaybeFlipIPv6toCJDNS(const CService& service)
{
CService ret{service};
- if (ret.m_net == NET_IPV6 && ret.m_addr[0] == 0xfc && IsReachable(NET_CJDNS)) {
+ if (ret.m_net == NET_IPV6 && ret.HasCJDNSPrefix() && IsReachable(NET_CJDNS)) {
ret.m_net = NET_CJDNS;
}
return ret;