Updated openstack/openstack

Project: openstack/oslo.serialization  38ac21b523f23f802557d94b527821bc84deaa16

Don't iterate through addresses in netaddr.IPNetwork

Currently, to_primitive tries to iterate through all addresses in the
network, because the type doesn't have a special handling that would
short curcuit it, but also has __iter__. This may be detrimental to
performance, up to the point of node crash due to memory exhaustion if
the passed network range is too large (think of 0.0.0.0/0 or even
2001::/64). This behavior also makes it impossible to restore the
original data format (CIDR).

This patch short curcuits the iteration by handling the IPNetwork type
as a special case, same as we do for IPAddress.

Change-Id: I6aecd2d057d282a655ff9e4918c164253142b188
Closes-Bug: #1698355
This commit is contained in:
Ihar Hrachyshka 2017-06-16 11:43:21 -07:00 committed by Gerrit Code Review
parent 9ed4089b01
commit c54eefdb3e
1 changed files with 1 additions and 1 deletions

@ -1 +1 @@
Subproject commit 98642b2d6960b0eb1072bf8daa75fab59c1b8f40
Subproject commit 38ac21b523f23f802557d94b527821bc84deaa16