diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2021-09-10 10:28:10 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2021-11-03 14:58:52 +0100 |
commit | c2d751abbae3811adaf856b1dd1b71b33e54d315 (patch) | |
tree | fffb8f465effc3fa2915af961b4e4137add70ed7 | |
parent | 9b43b3b257a00f777538fcc6e2550702055a1488 (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.cpp | 5 |
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; |