summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhagbard <vyosdev@derith.de>2019-02-22 10:11:14 -0800
committerhagbard <vyosdev@derith.de>2019-02-22 10:11:14 -0800
commit5ac03c871aa044eb483364de0e86e08503012f4f (patch)
treedf6481139bba3c37efa607b7a425ec6f1420b531
parentf4cbcbf2d803cdbe769ecaf8fc2651cc93f00cf8 (diff)
downloadvyos-1x-5ac03c871aa044eb483364de0e86e08503012f4f.tar.gz
vyos-1x-5ac03c871aa044eb483364de0e86e08503012f4f.zip
bugfix: static-mapping-host alias not mandatory, verification adjusted
-rwxr-xr-xsrc/conf_mode/host_name.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py
index bdb99a7a4..c0341a77c 100755
--- a/src/conf_mode/host_name.py
+++ b/src/conf_mode/host_name.py
@@ -153,7 +153,7 @@ def verify(config):
if config['static_host_mapping']['hostnames']:
for hn in config['static_host_mapping']['hostnames']:
for hn_alias in config['static_host_mapping']['hostnames'][hn]['alias'].split(' '):
- if not hostname_regex.match(hn_alias):
+ if not hostname_regex.match(hn_alias) and len (hn_alias) !=0:
raise ConfigError('Invalid hostname alias ' + hn_alias)
return None