Skip to content
  • Joey Hess's avatar
    added isPrivateAddress and isLoopbackAddress · 014a3fef
    Joey Hess authored
    For use in a security boundary enforcement.
    
    Based on https://en.wikipedia.org/wiki/Reserved_IP_addresses
    
    Including supporting IPv4 addresses embedded in IPv6 addresses. Because
    while RFC6052 3.1 says "Address translators MUST NOT translate packets
    in which an address is composed of the Well-Known Prefix and a non-
    global IPv4 address; they MUST drop these packets", I don't want to
    trust that implementations get that right when enforcing a security
    boundary.
    
    This commit was sponsored by John Pellman on Patreon.
    014a3fef