refactor(dnsdiam): check discovered identities with DiameterIdentity.Valid

Merged
GO
11d ago
+81-2

Discovered host and realm names now go through
datatype.DiameterIdentity.Valid instead of dnsdiam's own copy of the rule.
Service owner names such as _diameter._tcp keep their own check, which
allows underscores (RFC 6733 §5.2 as updated by RFC 8553). Accepted
names, ErrInvalid and the normalised names are unchanged.

Require the go-diameter revision that adds Valid.

Closes #132.


Summary by cubic

Discovered host and realm names now go through datatype.DiameterIdentity.Valid instead of dnsdiam's own copy of the rule. Accepted names, ErrInvalid, and normalised names are unchanged; service owner names such as _diameter._tcp keep their own check, which allows underscores (RFC 6733 §5.2 as updated by RFC 8553).

Requires the go-diameter revision that adds Valid. Closes #132.