Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
radicle/node: `Address` improvements
Merged lorenz opened 5 months ago

radicle/node: Address::is_local for DNS names

Address:is_local would return false for all DNS names. This is incorrect, with one counterexample being the name “localhost”, which generally resolves to a local (usually loopback) address.

The function is changed to catch “localhost”, but also the top level domain “.localhost”, which is reserved in RFC 2606, Section 2.

Address::is_routable would return true for all DNS names. While it is much harder to decide global routeability based on a domain name, as these usually have to be resolved to an address before being able to judge routability, there is one particular class of names, namely local ones (see above), which are not globally routable.

radicle/node: Revisit routeability of IP addresses

All IPv6 addresses would be considered globally routeable, even though the Rust standard library offers convenience functions to check for loopback, link-local addresses etc.

Improve checks for IPv6 routeability to catch the most obvious cases of local or unspecified addresses.

Refactor the check for IPv4 routeability to be more readable and refer to RFCs, IANA lists, and Rust stabilization tracking issues as appropriate.

lorenz opened with revision 57b4dcd3 on base 45abb881 +40 -14 5 months ago

radicle/node: Address::is_local for DNS names

Address:is_local would return false for all DNS names. This is incorrect, with one counterexample being the name “localhost”, which generally resolves to a local (usually loopback) address.

The function is changed to catch “localhost”, but also the top level domain “.localhost”, which is reserved in RFC 2606, Section 2.

Address::is_routable would return true for all DNS names. While it is much harder to decide global routeability based on a domain name, as these usually have to be resolved to an address before being able to judge routability, there is one particular class of names, namely local ones (see above), which are not globally routable.

radicle/node: Revisit routeability of IP addresses

All IPv6 addresses would be considered globally routeable, even though the Rust standard library offers convenience functions to check for loopback, link-local addresses etc.

Improve checks for IPv6 routeability to catch the most obvious cases of local or unspecified addresses.

Refactor the check for IPv4 routeability to be more readable and refer to RFCs, IANA lists, and Rust stabilization tracking issues as appropriate.

fintohaps pushed revision 2 999d11ae on base dc624ed5 +40 -14 5 months ago

Rebase

fintohaps merged revision 999d11ae at 37d4ae4a 5 months ago