diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2021-09-13 13:02:05 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2021-11-03 14:58:50 +0100 |
commit | 6387f397b323b0fb4ca303fe418550f5465147c6 (patch) | |
tree | 28a81daab7dda4beb6920516290dd365b41c8ab4 /src/netaddress.h | |
parent | e6890fcb440245c9a24ded0b7af46267453433f1 (diff) |
net: recognize CJDNS addresses as such
In some cases addresses come from an external source as a string or as a
`struct sockaddr_in6`, without a tag to tell whether it is a private
IPv6 or a CJDNS address. In those cases interpret the address as a CJDNS
address instead of an IPv6 address if `-cjdnsreachable` is set and the
seemingly-IPv6-address belongs to `fc00::/8`. Those external sources are:
* `-externalip=`
* `-bind=`
* UPnP
* `getifaddrs(3)` (called through `-discover`)
* `addnode`
* `connect`
* incoming connections (returned by `accept(2)`)
Diffstat (limited to 'src/netaddress.h')
-rw-r--r-- | src/netaddress.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/netaddress.h b/src/netaddress.h index 57eb8bc72f..f074c1d3ec 100644 --- a/src/netaddress.h +++ b/src/netaddress.h @@ -550,6 +550,7 @@ public: } friend class CServiceHash; + friend CService MaybeFlipIPv6toCJDNS(const CService& service); }; class CServiceHash |