]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: allow hostname to begin with a letter or number 2154/head
authorDon Slice <dslice@cumulusnetworks.com>
Tue, 1 May 2018 21:13:51 +0000 (21:13 +0000)
committerDon Slice <dslice@cumulusnetworks.com>
Tue, 1 May 2018 21:13:51 +0000 (21:13 +0000)
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>
lib/command.c

index 0720762da02c44b126d3b8e324002c0ad38e4916..2744061b5a1ed3b4a52fa67040cade0047d1dd58 100644 (file)
@@ -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;
        }