summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/host_name.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py
index 19c306df8..27e2d9170 100755
--- a/src/conf_mode/host_name.py
+++ b/src/conf_mode/host_name.py
@@ -164,6 +164,8 @@ def verify(config):
# static mappings alias hostname
if config['static_host_mapping']['hostnames']:
for hn in config['static_host_mapping']['hostnames']:
+ if not config['static_host_mapping']['hostnames'][hn]['ipaddr']:
+ raise ConfigError('IP address required for ' + hn)
for hn_alias in config['static_host_mapping']['hostnames'][hn]['alias'].split(' '):
if not hostname_regex.match(hn_alias) and len (hn_alias) !=0:
raise ConfigError('Invalid hostname alias ' + hn_alias)