From fc094655080955f7bfcb628b544d131145830b67 Mon Sep 17 00:00:00 2001 From: "Sean M. Collins" Date: Tue, 9 Dec 2014 11:36:53 -0700 Subject: [PATCH] Generate an IPv6 address when PUBLIC_BRIDGE does not have one Closes-Bug: #1400823 Change-Id: Ic79fd003aea2af7b258397ec2cdfd70c8568743c --- lib/neutron | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/neutron b/lib/neutron index 5a2bfea801..c1311db1e0 100644 --- a/lib/neutron +++ b/lib/neutron @@ -1177,6 +1177,12 @@ function _neutron_configure_router_v6 { # and then on to recover the public bridge's link local address sudo sysctl -w net.ipv6.conf.${PUBLIC_BRIDGE}.disable_ipv6=1 sudo sysctl -w net.ipv6.conf.${PUBLIC_BRIDGE}.disable_ipv6=0 + if ! ip -6 addr show dev $PUBLIC_BRIDGE | grep 'scope global'; then + # Create an IPv6 ULA address for PUBLIC_BRIDGE if one is not present + IPV6_BRIDGE_ULA=`uuidgen | sed s/-//g | cut -c 23- | sed -e "s/\(..\)\(....\)\(....\)/\1:\2:\3/"` + sudo ip -6 addr add fd$IPV6_BRIDGE_ULA::1 dev $PUBLIC_BRIDGE + fi + if is_neutron_ovs_base_plugin && [[ "$Q_USE_NAMESPACE" = "True" ]]; then local ext_gw_interface=$(_neutron_get_ext_gw_interface) local ipv6_cidr_len=${IPV6_PUBLIC_RANGE#*/}