docs/cidrnetmask: Address confusing note about IPv6 (#37029)

This commit is contained in:
Radek Simko 2025-05-13 16:32:58 +01:00 committed by GitHub
parent 2a110bb78a
commit ee3a518fd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,8 +20,8 @@ cidrnetmask(prefix)
The result is a subnet address formatted in the conventional dotted-decimal
IPv4 address syntax, as expected by some software.
CIDR notation is the only valid notation for IPv6 addresses, so `cidrnetmask`
produces an error if given an IPv6 address.
The `cidrnetmask` function only accepts IPv4 addresses in CIDR notation.
If you use an IPv6 address, `cidrnetmask` returns an error.
-> **Note:** As a historical accident, this function interprets IPv4 address
octets that have leading zeros as decimal numbers, which is contrary to some