IPv6 validation

前端 未结 6 962
抹茶落季
抹茶落季 2021-01-01 22:06

I used IPAddressUtil.isIPv6LiteralAddress (ipAddress) method to validate IPv6, but this method fails for ipv6-address/prefix-length format (format is mentioned

6条回答
  •  不思量自难忘°
    2021-01-01 22:45

    Strictly speaking, a section 2.3 does not describe an address representation, but a representation of address prefix (even the "full-length" prefix is not the same as an address).

    An IPv6 address prefix is represented by the notation: ipv6-address/prefix-length where ipv6-address is an IPv6 address in any of the notations listed in Section 2.2.

    That means you may safely disregard this format if you need to validate addresses.

提交回复
热议问题