summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDon Slice <dslice@cumulusnetworks.com>2018-05-01 23:13:51 +0200
committerDon Slice <dslice@cumulusnetworks.com>2018-05-01 23:13:51 +0200
commitd4f368e15af88f37503d3c32f6e8f29ebaba756d (patch)
tree025118ac1e2ff2aa2f2ee87db7f407a7e724362a /lib
parentMerge pull request #2148 from opensourcerouting/snapupdate (diff)
downloadfrr-d4f368e15af88f37503d3c32f6e8f29ebaba756d.tar.xz
frr-d4f368e15af88f37503d3c32f6e8f29ebaba756d.zip
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c
index 0720762da..2744061b5 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -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;
}