SaltDns. Knot. PeerAddress
(Salt v1.0.0)
The transfer address of the replica that holds the lease, as Knot's
configuration takes it: <IP literal>@<port>.
The holder writes its address into the lease row in the database; the
followers copy it into their Knot's configuration (SaltDns.Knot.point_peer/1).
That is data from the database that ends up in a configuration, so it is
parsed strictly here and only the canonical form this module produces is ever
passed on: an IPv4 or IPv6 literal (no host name, no zone id), @, a port from
1 to 65535, and nothing else. Anything else, including whitespace, control
characters, option syntax and shell syntax, is :error. The address is only
ever an element of an argument list; no shell is involved anywhere.
Summary
Functions
Returns {:ok, canonical} or :error. The unspecified address (0.0.0.0,
::) and multicast addresses are refused.