Browse code

Merge "Generate an IPv6 address when PUBLIC_BRIDGE does not have one"

Jenkins authored on 2014/12/13 08:03:21
Showing 1 changed files
... ...
@@ -1194,6 +1194,12 @@ function _neutron_configure_router_v6 {
1194 1194
         # and then on to recover the public bridge's link local address
1195 1195
         sudo sysctl -w net.ipv6.conf.${PUBLIC_BRIDGE}.disable_ipv6=1
1196 1196
         sudo sysctl -w net.ipv6.conf.${PUBLIC_BRIDGE}.disable_ipv6=0
1197
+        if ! ip -6 addr show dev $PUBLIC_BRIDGE | grep 'scope global'; then
1198
+            # Create an IPv6 ULA address for PUBLIC_BRIDGE if one is not present
1199
+            IPV6_BRIDGE_ULA=`uuidgen | sed s/-//g | cut -c 23- | sed -e "s/\(..\)\(....\)\(....\)/\1:\2:\3/"`
1200
+            sudo ip -6 addr add fd$IPV6_BRIDGE_ULA::1 dev $PUBLIC_BRIDGE
1201
+        fi
1202
+
1197 1203
         if is_neutron_ovs_base_plugin && [[ "$Q_USE_NAMESPACE" = "True" ]]; then
1198 1204
             local ext_gw_interface=$(_neutron_get_ext_gw_interface)
1199 1205
             local ipv6_cidr_len=${IPV6_PUBLIC_RANGE#*/}