Skip to content

Commit

Permalink
lib: allow hostname to begin with a letter or number
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dslicenc committed May 1, 2018
1 parent 4fb6f51 commit d4f368e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/command.c
Expand Up @@ -1873,7 +1873,7 @@ DEFUN (config_hostname,
{
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");
return CMD_WARNING_CONFIG_FAILED;
}
Expand Down

0 comments on commit d4f368e

Please sign in to comment.