some updates to how i handle address allocation for he_ipv6

This commit is contained in:
brent s. 2020-05-13 13:31:22 -04:00
parent e7ca17b24a
commit 0be3cfc386
Signed by: bts
GPG Key ID: 8C004C2F93481F6B

View File

@ -18,7 +18,17 @@
<xs:complexType name="e_he_ipv6_tunnel">
<xs:all>
<xs:element name="server" type="t_net_addr_ip4"/>
<xs:element name="allocs">
<xs:element name="client" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="t_net_addr_ip6">
<!-- VERY most likely "64" but we can't define a default with required. -->
<xs:attribute name="prefix" type="t_he_ipv6_prefix" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="allocations">
<xs:complexType>
<xs:sequence minOccurs="1">
<!-- HE only allocates a single /64 and, upon request, a single /48 per tunnel. -->
@ -28,7 +38,7 @@
<xs:extension base="t_net_addr_ip6">
<!-- VERY most likely "64" but we can't define a default with required. -->
<xs:attribute name="prefix" type="t_he_ipv6_prefix" use="required"/>
<xs:attribute name="iface" type="t_linux_iface_name" use="required"/>
<xs:attribute name="id" type="xs:token" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
@ -43,15 +53,25 @@
<xs:selector xpath=".//*"/>
<xs:field xpath="@prefix"/>
</xs:unique>
<xs:unique name="uniq_alloc_id">
<xs:selector xpath=".//*"/>
<xs:field xpath="@id"/>
</xs:unique>
</xs:element>
<xs:element name="client" minOccurs="1" maxOccurs="1">
<xs:element name="assignments" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="t_net_addr_ip6">
<!-- VERY most likely "64" but we can't define a default with required. -->
<xs:attribute name="prefix" type="t_he_ipv6_prefix" use="required"/>
</xs:extension>
</xs:simpleContent>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="assign" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="prefix" type="t_he_ipv6_prefix" use="optional" default="64"/>
<!-- TODO: alloc must be a defined alloc "id" attribute value. -->
<xs:attribute name="alloc" type="xs:token" use="required"/>
<xs:attribute name="iface" type="t_linux_iface_name" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="radvd" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="radvdDns" type="xs:boolean" use="optional" default="false"/>
</xs:complexType>
</xs:element>
</xs:all>