summaryrefslogtreecommitdiff
path: root/neutron/common/ipv6_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'neutron/common/ipv6_utils.py')
-rw-r--r--neutron/common/ipv6_utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/neutron/common/ipv6_utils.py b/neutron/common/ipv6_utils.py
index 96e1ef2344..ec9168ea36 100644
--- a/neutron/common/ipv6_utils.py
+++ b/neutron/common/ipv6_utils.py
@@ -20,6 +20,7 @@ import os
import netaddr
+from neutron.common import constants
from neutron.openstack.common.gettextutils import _LI
from neutron.openstack.common import log
@@ -61,3 +62,9 @@ def is_enabled():
if not _IS_IPV6_ENABLED:
LOG.info(_LI("IPv6 is not enabled on this system."))
return _IS_IPV6_ENABLED
+
+
+def is_slaac_subnet(subnet):
+ """Check if subnet uses SLAAC addressing."""
+ return (subnet['ipv6_address_mode'] == constants.IPV6_SLAAC
+ or subnet['ipv6_address_mode'] == constants.DHCPV6_STATELESS)