summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Holer <vlastimil.holer@gmail.com>2014-01-28 19:09:46 +0100
committerVlastimil Holer <vlastimil.holer@gmail.com>2014-01-28 19:09:46 +0100
commit7659f06379122218e11ef445cd1f435ea5e74f40 (patch)
tree6910f91f06096adc211d575966e97048f351e2dd
parent0be4922d92e874b2e3300bdde65829cdb6569524 (diff)
downloadvyos-cloud-init-7659f06379122218e11ef445cd1f435ea5e74f40.tar.gz
vyos-cloud-init-7659f06379122218e11ef445cd1f435ea5e74f40.zip
Allow zeros when detecting IPv4 address (e.g. 192.168.0.1)
-rw-r--r--cloudinit/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index b3332acd..61bcdeb1 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -369,7 +369,7 @@ def is_ipv4(instr):
return False
try:
- toks = [x for x in toks if (int(x) < 256 and int(x) > 0)]
+ toks = [x for x in toks if (int(x) < 256 and int(x) >= 0)]
except:
return False