]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
reject leading '0's in IPv4 addr to avoid ambiguity
authorBo Chi <shcbo@cn.ibm.com>
Thu, 10 Dec 2015 13:42:26 +0000 (08:42 -0500)
committerBo Chi <shcbo@cn.ibm.com>
Thu, 17 Dec 2015 12:45:34 +0000 (07:45 -0500)
commitd515a8db880388092b61f4649f8dd0b29a2c5de3
tree46db174fdc62c98e7551c860d7ee99b0b0e317b1
parent981b7e4cb4f6752568059c03ef3722a1c828e2e7
reject leading '0's in IPv4 addr to avoid ambiguity

If a IPv4 address has a leading '0', it will be interpreted as an
octal number, e.g. 10.0.0.011 will be interpreted as 10.0.0.9.
Users who are not familiar with or not expecting octal interpretation
will not get the address they intended. Since there is no standard
around this, we reject leading '0's to avoid ambiguity.

APIImpact
Change-Id: I3163ba13468c47d385585221d2167fbe31d24010
Closes-Bug: #1524220
neutron/api/v2/attributes.py
neutron/tests/unit/api/v2/test_attributes.py