]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Consider all address scopes in init_l3
authorAndrew Boik <dboik@cisco.com>
Fri, 27 Mar 2015 20:21:29 +0000 (16:21 -0400)
committerAndrew Boik <dboik@cisco.com>
Wed, 8 Apr 2015 14:36:34 +0000 (10:36 -0400)
commite8603512c4e7aa976ad29dfaf609505267b8c870
tree4e6fee7c6197fa4e1e0d04dc98f96ab725d38979
parent21bef562c23d96fe41daeedeb43c0bb2d1c53ed0
Consider all address scopes in init_l3

Currently init_l3 retrieves the list of global addresses from the kernel
on a specific device in a network namespace. If any of the addresses are
not in the ip_cidrs argument to init_l3, they will be deleted. The
problem with only listing global addresses is that if a site-local or
link-local address is added during a subnet-create, and the user wishes
to later delete the address, init_l3 will never consider that address
for deletion.

To fix this, init_l3 should not limit its scope when listing addresses
on an interface. It should, however, ignore the default IPv6 link-local
address assigned by the operating system as this address is not known to
Neutron and should not be deleted.

Change-Id: I3d7a3e318e32acae3836c51e4e2e95ae756e645b
Closes-Bug: #1437499
neutron/agent/linux/interface.py
neutron/tests/unit/agent/linux/test_interface.py