aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2021-09-10 10:28:10 +0200
committerVasil Dimov <vd@FreeBSD.org>2021-11-03 14:58:52 +0100
commitc2d751abbae3811adaf856b1dd1b71b33e54d315 (patch)
treefffb8f465effc3fa2915af961b4e4137add70ed7
parent9b43b3b257a00f777538fcc6e2550702055a1488 (diff)
net: take CJDNS into account in CNetAddr::GetReachabilityFrom()
This way `GetLocal()` will pick our CJDNS address for a CJDNS peer.
-rw-r--r--src/netaddress.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/netaddress.cpp b/src/netaddress.cpp
index c7ec2b8659..e87a27979d 100644
--- a/src/netaddress.cpp
+++ b/src/netaddress.cpp
@@ -892,6 +892,11 @@ int CNetAddr::GetReachabilityFrom(const CNetAddr *paddrPartner) const
case NET_I2P: return REACH_PRIVATE;
default: return REACH_DEFAULT;
}
+ case NET_CJDNS:
+ switch (ourNet) {
+ case NET_CJDNS: return REACH_PRIVATE;
+ default: return REACH_DEFAULT;
+ }
case NET_TEREDO:
switch(ourNet) {
default: return REACH_DEFAULT;