File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,11 @@ bool CNetAddr::IsRFC4843() const
204
204
return (GetByte (15 ) == 0x20 && GetByte (14 ) == 0x01 && GetByte (13 ) == 0x00 && (GetByte (12 ) & 0xF0 ) == 0x10 );
205
205
}
206
206
207
+ bool CNetAddr::IsRFC7343 () const
208
+ {
209
+ return (GetByte (15 ) == 0x20 && GetByte (14 ) == 0x01 && GetByte (13 ) == 0x00 && (GetByte (12 ) & 0xF0 ) == 0x20 );
210
+ }
211
+
207
212
/* *
208
213
* @returns Whether or not this is a dummy address that maps an onion address
209
214
* into IPv6.
@@ -289,7 +294,7 @@ bool CNetAddr::IsValid() const
289
294
*/
290
295
bool CNetAddr::IsRoutable () const
291
296
{
292
- return IsValid () && !(IsRFC1918 () || IsRFC2544 () || IsRFC3927 () || IsRFC4862 () || IsRFC6598 () || IsRFC5737 () || (IsRFC4193 () && !IsTor ()) || IsRFC4843 () || IsLocal () || IsInternal ());
297
+ return IsValid () && !(IsRFC1918 () || IsRFC2544 () || IsRFC3927 () || IsRFC4862 () || IsRFC6598 () || IsRFC5737 () || (IsRFC4193 () && !IsTor ()) || IsRFC4843 () || IsRFC7343 () || IsLocal () || IsInternal ());
293
298
}
294
299
295
300
/* *
Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ class CNetAddr
63
63
bool IsRFC3964 () const ; // IPv6 6to4 tunnelling (2002::/16)
64
64
bool IsRFC4193 () const ; // IPv6 unique local (FC00::/7)
65
65
bool IsRFC4380 () const ; // IPv6 Teredo tunnelling (2001::/32)
66
- bool IsRFC4843 () const ; // IPv6 ORCHID (2001:10::/28)
66
+ bool IsRFC4843 () const ; // IPv6 ORCHID (deprecated) (2001:10::/28)
67
+ bool IsRFC7343 () const ; // IPv6 ORCHIDv2 (2001:20::/28)
67
68
bool IsRFC4862 () const ; // IPv6 autoconfig (FE80::/64)
68
69
bool IsRFC6052 () const ; // IPv6 well-known prefix for IPv4-embedded address (64:FF9B::/96)
69
70
bool IsRFC6145 () const ; // IPv6 IPv4-translated address (::FFFF:0:0:0/96) (actually defined in RFC2765)
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ BOOST_AUTO_TEST_CASE(netbase_properties)
59
59
BOOST_CHECK (ResolveIP (" FC00::" ).IsRFC4193 ());
60
60
BOOST_CHECK (ResolveIP (" 2001::2" ).IsRFC4380 ());
61
61
BOOST_CHECK (ResolveIP (" 2001:10::" ).IsRFC4843 ());
62
+ BOOST_CHECK (ResolveIP (" 2001:20::" ).IsRFC7343 ());
62
63
BOOST_CHECK (ResolveIP (" FE80::" ).IsRFC4862 ());
63
64
BOOST_CHECK (ResolveIP (" 64:FF9B::" ).IsRFC6052 ());
64
65
BOOST_CHECK (ResolveIP (" FD87:D87E:EB43:edb1:8e4:3588:e546:35ca" ).IsTor ());
You can’t perform that action at this time.
0 commit comments