fthomas / fthomas/refined

PrivateNetwork type does not match the expected IP addresses

Open
#702 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
1.7k
Forks
152
Avg merge
1h 20m
Merged PRs (30d)
6

Description

Was there a particular reason behind the RFCs that were chosen in https://github.com/fthomas/refined/pull/356?

I found that `PrivateNetwork` did not match what I expected it to.

The addresses in [rfc5737](https://tools.ietf.org/html/rfc5737#section-4) seem like they should never be routed to:
> 4. Operational Implications
>
> Addresses within the TEST-NET-1, TEST-NET-2, and TEST-NET-3 blocks
> SHOULD NOT appear on the public Internet and are used without any
> coordination with IANA or an Internet registry [RFC2050]. Network
> operators SHOULD add these address blocks to the list of non-
> routeable address spaces, and if packet filters are deployed, then
> this address block SHOULD be added to packet filters.
>
> These blocks are not for local use, and the filters may be used in
> both local and public contexts.

There is also a bug in `Rfc1918ClassBPrivateSpec`. It should start at `172.16.0.0` not `172.15.0.0`. https://tools.ietf.org/html/rfc1918#section-3

I'm by no means an expert but it seems like adding types for [rfc6890](https://tools.ietf.org/html/rfc6890) would be a better way to go.

Without digging into each RFC I suspect what most people would want is any address which is listed in rfc6890 as a valid destination IP address and maybe the loopback addresses.
>Destination - A boolean value indicating whether an address from
the allocated special-purpose address block is valid when used as
the destination address of an IP datagram that transits two
devices.

Thoughts?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.