mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
conf: network: Allow hostnames to start with a number
RFC952 mandated that hostnames would start with an alpha character. This requirement was later relaxed by RFC1123 which allowed hostnames to start with a number as well. https://datatracker.ietf.org/doc/html/rfc952 https://datatracker.ietf.org/doc/html/rfc1123#page-13 Signed-off-by: Nicolas Lécureuil <nicolas.lecureuil@siveo.net> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
e185f03f39
commit
673b74be5f
@ -548,7 +548,7 @@ virNetworkDHCPHostDefParseXML(const char *networkName,
|
||||
}
|
||||
|
||||
name = virXMLPropString(node, "name");
|
||||
if (name && (!g_ascii_isalpha(name[0]))) {
|
||||
if (name && !(g_ascii_isalpha(name[0]) || g_ascii_isdigit(name[0]))) {
|
||||
virReportError(VIR_ERR_XML_ERROR,
|
||||
_("Cannot use host name '%s' in network '%s'"),
|
||||
name, networkName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user