Introduce an additional IP address validation instead of assuming
that netaddr provides it. Namely, it ensures that an address
either has ':' (IPv6) or 3 periods like 'xx.xx.xx.xx'. (IPv4)
The "'1' * 59" test case recently introduced by
commit 1681f62ec91b6c3705a14393815542dc1746de71 fails on
some platforms because it's considered a valid address by
their inet_aton. Examples of such platforms: NetBSD, OS X
While one might argue it's a fault of the platforms, this is
a historical behavior which is probably too late to change there.
(The breakage has been hidden by later UT changes in
commit 35662d07628452d14306f5197871ad64f6396ff3 .
This commit includes a UT change to uncover the problem again.)
(cherry-picked from 2794bb89d664355ae1194a0b1f8346c1538caef8)
Closes-Bug: #1394867
Related-Bug: #1378450
Change-Id: Ibe02f8b7c4d437bf7abbe7304ca138bdcf4bfdb9
Reviewed: https:/ /review. openstack. org/161930 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=d329c221c37 714f1ce306918de 8367dd948ec220
Committed: https:/
Submitter: Jenkins
Branch: stable/juno
commit d329c221c37714f 1ce306918de8367 dd948ec220
Author: YAMAMOTO Takashi <email address hidden>
Date: Fri Nov 21 14:16:03 2014 +0900
attributes: Additional IP address validation
Introduce an additional IP address validation instead of assuming
that netaddr provides it. Namely, it ensures that an address
either has ':' (IPv6) or 3 periods like 'xx.xx.xx.xx'. (IPv4)
The "'1' * 59" test case recently introduced by 705a14393815542 dc1746de71 fails on
commit 1681f62ec91b6c3
some platforms because it's considered a valid address by
their inet_aton. Examples of such platforms: NetBSD, OS X
While one might argue it's a fault of the platforms, this is
a historical behavior which is probably too late to change there.
(The breakage has been hidden by later UT changes in 14306f5197871ad 64f6396ff3 .
commit 35662d07628452d
This commit includes a UT change to uncover the problem again.)
(cherry-picked from 2794bb89d664355 ae1194a0b1f8346 c1538caef8) bf7abbe7304ca13 8bdcf4bfdb9
Closes-Bug: #1394867
Related-Bug: #1378450
Change-Id: Ibe02f8b7c4d437