Skip to content

Commit 790266f

Browse files
committed
Delete $IPV6_PUBLIC_NETWORK_GATEWAY IP during cleanup
So that it does not end up being the IP address that is picked to move back to $PUBLIC_INTERFACE when we call _move_neutron_address_route Change-Id: I3d29d4f11feff308f6ad5d950ef004b48ec11b67 Closes-Bug: 1514984
1 parent 9af8199 commit 790266f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/neutron-legacy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,10 @@ function cleanup_neutron {
835835
_move_neutron_addresses_route "$OVS_PHYSICAL_BRIDGE" "$PUBLIC_INTERFACE" False "inet"
836836

837837
if [[ $(ip -f inet6 a s dev "$OVS_PHYSICAL_BRIDGE" | grep -c 'global') != 0 ]]; then
838+
# ip(8) wants the prefix length when deleting
839+
local v6_gateway
840+
v6_gateway=$(ip -6 a s dev $OVS_PHYSICAL_BRIDGE | grep $IPV6_PUBLIC_NETWORK_GATEWAY | awk '{ print $2 }')
841+
sudo ip -6 addr del $v6_gateway dev $OVS_PHYSICAL_BRIDGE
838842
_move_neutron_addresses_route "$OVS_PHYSICAL_BRIDGE" "$PUBLIC_INTERFACE" False "inet6"
839843
fi
840844

0 commit comments

Comments
 (0)