]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Provide work around for 0.0.0.0/0 ::/0 for ipset
authorAaron Rosen <aaronorosen@gmail.com>
Wed, 3 Jun 2015 23:19:39 +0000 (16:19 -0700)
committerAaron Rosen <aaronorosen@gmail.com>
Wed, 24 Jun 2015 17:25:24 +0000 (10:25 -0700)
commitd9a23f882f0d78aaca34c3607d9ca9ad54ac063b
treefe523c68a34838dc2905288e79d3b5ed5af1877c
parent9d9684a1ab7a0cb89b37f2a555839c90d41db0b8
Provide work around for 0.0.0.0/0 ::/0 for ipset

Previously, the ipset_manager would pass in 0.0.0.0/0 or ::/0 if
these addresses were inputted as allowed address pairs. This causes
ipset to raise an error as it does not work with zero prefix sizes.
To solve this problem we use two ipset rules to represent this:

Ipv4: 0.0.0.0/1 and 128.0.0.1/1
IPv6: ::/1' and '8000::/1

All of this logic is handled via _sanitize_addresses() in the ipset_manager
which is called to convert the input.

Change-Id: I8c6a08e0cf3b5b5386fe03af9f2174c666b8ac75
Closes-bug: 1461054
neutron/agent/linux/ipset_manager.py
neutron/tests/unit/agent/linux/test_ipset_manager.py