summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/server/install.py
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2016-09-02 17:39:01 +0200
committerDavid Kupka <dkupka@redhat.com>2016-09-07 16:22:03 +0200
commitb232ad463cf43596cdf397e51469df13a89e83fa (patch)
treeae9e45f450a29f9640babfb1152f17b6f61625be /ipaserver/install/server/install.py
parentf3d379071a9af50e38fcc07491bc68b8d3d172a4 (diff)
downloadfreeipa-b232ad463cf43596cdf397e51469df13a89e83fa.tar.gz
freeipa-b232ad463cf43596cdf397e51469df13a89e83fa.tar.xz
freeipa-b232ad463cf43596cdf397e51469df13a89e83fa.zip
Show warning when net/broadcast IP address is used in installer
https://fedorahosted.org/freeipa/ticket/5814 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaserver/install/server/install.py')
-rw-r--r--ipaserver/install/server/install.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py
index 6644a6b31..2ef9bdb76 100644
--- a/ipaserver/install/server/install.py
+++ b/ipaserver/install/server/install.py
@@ -609,6 +609,20 @@ def install_check(installer):
not installer.interactive, False,
options.ip_addresses)
+ for ip in ip_addresses:
+ if ip.is_network_addr():
+ root_logger.warning("IP address %s might be network address", ip)
+ # fixme: once when loggers will be fixed, we can remove this print
+ print(
+ "WARNING: IP address {} might be network address".format(ip),
+ file=sys.stderr)
+ if ip.is_broadcast_addr():
+ root_logger.warning("IP address %s might be broadcast address", ip)
+ # fixme: once when loggers will be fixed, we can remove this print
+ print(
+ "WARNING: IP address {} might be broadcast address".format(ip),
+ file=sys.stderr)
+
# installer needs to update hosts file when DNS subsystem will be
# installed or custom addresses are used
if options.ip_addresses or options.setup_dns: