Juergen Schoenwaelder <[email protected]>
writes:
Lada,
the definition of inet:domain-name already has text that
Internet host names have a stricter syntax. Perhaps we should
simply state explicitely in the definition of host that the
stricter rules apply?
I understand that you want to capture more in the definition
itself. Perhaps this makes sense and is backwards compatible
(for implementations that followed the advice in the descriptin
of inet:domain-name).
Yes. In this case the constraint is easy to express it in a
"pattern" statement, which is of course considerably more useful
than having it only in the description.
Lada
/js
On Fri, Mar 29, 2019 at 03:29:05PM +0100, Ladislav Lhotka wrote:
Hi, the inet:host type should not use the inet:domain-name as
its member because the latter type doesn't satisfy the
requirements of RFC 952 and 1123 on host names. For example,
the type now permits a single dot (".") as the value or the
underscore character. I propose to change the "host" type as
follows: OLD
typedef host {
type union {
type inet:ip-address; type inet:domain-name;
} ...
}
NEW
typedef host {
type union {
type inet:ip-address; type inet:host-name;
} ...
}
A reasonable definition of "host-name" is IMO a domain name
whose labels are NR- LDH (non-registered letter-digit-hyphen
label) [RFC 5890]:
typedef host-name {
type string {
pattern
'((([a-zA-Z0-9]([a-zA-Z0-9\-]){0,61})?[a-zA-Z0-9]\.)*'
+ '([a-zA-Z0-9]([a-zA-Z0-9\-]){0,61})?[a-zA-Z0-9]\.?)';
pattern '(.*\.)?..\-\-.*' {
modifier invert-match;
} length "2..253"; ...
}
}
Lada -- Ladislav Lhotka Head, CZ.NIC Labs PGP Key ID:
0xB8F92B08A9F76C67
_______________________________________________ netmod mailing
list [email protected]
https://www.ietf.org/mailman/listinfo/netmod
-- Juergen Schoenwaelder Jacobs University Bremen
gGmbH Phone: +49 421 200 3587 Campus Ring 1 | 28759
Bremen | Germany Fax: +49 421 200 3103
<https://www.jacobs-university.de/>
--
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod