-
Committer:
Scott Moser
-
Author(s):
Nish Aravamudan
-
Date:
2017-04-05 17:28:04 UTC
-
mfrom:
(481.1.2 curtin)
-
Revision ID:
smoser@ubuntu.com-20170405172804-20ii48h7hswpu84w
Fix iscsi disks that have a ':' in the target name.
The regular expression we have now incorrectly allows ':' in IPv4
addresses and hostnames, rather than only IPv6 addresses. This ends up as
an inability to use ':' in target names (common and supported), because we
greedily consume the prefix (host) and suffix (target).
In order to fix this, we need to require that IPv6 addresses are enclosed
in [], so we can disambiguate them from hostnames and IPv4 addresses which
have different validation.
Fix the regex and add a unittest for this case.