You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While it is a common misconception that 127.0.0.1 is the only IPv4 loopback address, the entire 127.0.0.0/8 block is considered loopback. It would be nice if Address4 provided an isLoopback() method as syntactic sugar for address.isInSubnet(new Address4('127.0.0.0/8')).
The text was updated successfully, but these errors were encountered:
@elyscape happy to merge a PR for this one if you'd like to add it! (i will implement it eventually if you don't but it could be a few days); you'd add it to lib/ipv4.js and a corresponding test in test/functionality-v4-test.js
An alternate option would be to implement it similarly to how it's implemented in Address6, by implementing address types. IPv4 has link-local, private, and multicast addresses, and it might be a good idea to provide detection of those.
While it is a common misconception that 127.0.0.1 is the only IPv4 loopback address, the entire 127.0.0.0/8 block is considered loopback. It would be nice if Address4 provided an
isLoopback()
method as syntactic sugar foraddress.isInSubnet(new Address4('127.0.0.0/8'))
.The text was updated successfully, but these errors were encountered: