Don't check validity of ipv4 when trying to add address that already exists.

Code checking validity only works for ipv6. So we only return True.
parent da754594
......@@ -767,7 +767,12 @@ class Interface(object):
# wait few moments
time.sleep(2)
# check existence on interface
# Fake success for local ipv4
if not ipv6:
return True
# check existence on interface for ipv6
_, result = callAndRead(['ip', 'addr', 'list', interface_name])
for l in result.split('\n'):
if address in l:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment