mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-16 02:55:06 +00:00
lib: allow hostname to begin with a letter or number
Customers have requested the ability to name their devices starting with a number instead of a letter. This fix changes the check for hostname to allow either a letter or a number. Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
This commit is contained in:
parent
4fb6f51928
commit
d4f368e15a
@ -1873,7 +1873,7 @@ DEFUN (config_hostname,
|
|||||||
{
|
{
|
||||||
struct cmd_token *word = argv[1];
|
struct cmd_token *word = argv[1];
|
||||||
|
|
||||||
if (!isalpha((int)word->arg[0])) {
|
if (!isalnum((int)word->arg[0])) {
|
||||||
vty_out(vty, "Please specify string starting with alphabet\n");
|
vty_out(vty, "Please specify string starting with alphabet\n");
|
||||||
return CMD_WARNING_CONFIG_FAILED;
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user