From 45d472c8782f927980044eaba0d49421e91fc0c8 Mon Sep 17 00:00:00 2001 From: sarthurdev <965089+sarthurdev@users.noreply.github.com> Date: Sat, 13 Jan 2024 00:28:01 +0100 Subject: dhcpv6: T3316: Move options to separate node and extend scopes * Also migrate `address-range` to `range` tag node for consistency with dhcpv4 server syntax --- interface-definitions/include/dhcp/option-v6.xml.i | 110 ++++++++++++++++ interface-definitions/service_dhcpv6-server.xml.in | 143 ++++----------------- 2 files changed, 133 insertions(+), 120 deletions(-) create mode 100644 interface-definitions/include/dhcp/option-v6.xml.i (limited to 'interface-definitions') diff --git a/interface-definitions/include/dhcp/option-v6.xml.i b/interface-definitions/include/dhcp/option-v6.xml.i new file mode 100644 index 000000000..1df0c3934 --- /dev/null +++ b/interface-definitions/include/dhcp/option-v6.xml.i @@ -0,0 +1,110 @@ + + + + DHCPv6 option + + + #include + #include + #include + + + NIS domain name for client to use + + #include + + Invalid NIS domain name + + + + + IPv6 address of a NIS Server + + ipv6 + IPv6 address of NIS server + + + + + + + + + + NIS+ domain name for client to use + + #include + + Invalid NIS+ domain name. May only contain letters, numbers and .-_ + + + + + IPv6 address of a NIS+ Server + + ipv6 + IPv6 address of NIS+ server + + + + + + + + + + IPv6 address of SIP server + + ipv6 + IPv6 address of SIP server + + + hostname + FQDN of SIP server + + + + + + + + + + + IPv6 address of an SNTP server for client to use + + + + + + + + + Vendor Specific Options + + + + + Cisco specific parameters + + + + + TFTP server name + + ipv6 + TFTP server IPv6 address + + + + + + + + + + + + + + diff --git a/interface-definitions/service_dhcpv6-server.xml.in b/interface-definitions/service_dhcpv6-server.xml.in index 6934ceeec..4c1a28016 100644 --- a/interface-definitions/service_dhcpv6-server.xml.in +++ b/interface-definitions/service_dhcpv6-server.xml.in @@ -89,11 +89,17 @@ - + #include + Parameters setting ranges for assigning IPv6 addresses + + #include + + Invalid range name, may only be alphanumeric, dot and hyphen + #include IPv6 prefix defining range of addresses to assign @@ -104,10 +110,9 @@ - - + First in range of consecutive IPv6 addresses to assign @@ -118,25 +123,21 @@ - - - - Last in range of consecutive IPv6 addresses - - ipv6 - IPv6 address - - - - - - - - + + + + Last in range of consecutive IPv6 addresses + + ipv6 + IPv6 address + + + + + + - - #include - #include + Parameters relating to the lease time @@ -180,51 +181,6 @@ - #include - - - NIS domain name for client to use - - #include - - Invalid NIS domain name - - - - - IPv6 address of a NIS Server - - ipv6 - IPv6 address of NIS server - - - - - - - - - - NIS+ domain name for client to use - - #include - - Invalid NIS+ domain name. May only contain letters, numbers and .-_ - - - - - IPv6 address of a NIS+ Server - - ipv6 - IPv6 address of NIS+ server - - - - - - - Parameters relating to IPv6 prefix delegation @@ -272,33 +228,6 @@ - - - IPv6 address of SIP server - - ipv6 - IPv6 address of SIP server - - - hostname - FQDN of SIP server - - - - - - - - - - - IPv6 address of an SNTP server for client to use - - - - - - Hostname for static mapping reservation @@ -308,6 +237,7 @@ Invalid static mapping hostname + #include #include #include #include @@ -349,33 +279,6 @@ - - - Vendor Specific Options - - - - - Cisco specific parameters - - - - - TFTP server name - - ipv6 - TFTP server IPv6 address - - - - - - - - - - - -- cgit v1.2.3 From 2d4db25386fcefd301868a4daa39d5578cbac779 Mon Sep 17 00:00:00 2001 From: sarthurdev <965089+sarthurdev@users.noreply.github.com> Date: Sat, 13 Jan 2024 00:29:49 +0100 Subject: dhcpv6: T3316: Add `listen-interface` as supported by Kea --- data/templates/dhcp-server/kea-dhcp6.conf.j2 | 4 ++++ interface-definitions/service_dhcpv6-server.xml.in | 1 + 2 files changed, 5 insertions(+) (limited to 'interface-definitions') diff --git a/data/templates/dhcp-server/kea-dhcp6.conf.j2 b/data/templates/dhcp-server/kea-dhcp6.conf.j2 index 3ce4e6370..3ab21551b 100644 --- a/data/templates/dhcp-server/kea-dhcp6.conf.j2 +++ b/data/templates/dhcp-server/kea-dhcp6.conf.j2 @@ -1,7 +1,11 @@ { "Dhcp6": { "interfaces-config": { +{% if listen_interface is vyos_defined %} + "interfaces": {{ listen_interface | tojson }}, +{% else %} "interfaces": [ "*" ], +{% endif %} "service-sockets-max-retries": 5, "service-sockets-retry-wait-time": 5000 }, diff --git a/interface-definitions/service_dhcpv6-server.xml.in b/interface-definitions/service_dhcpv6-server.xml.in index 4c1a28016..07cbfc85d 100644 --- a/interface-definitions/service_dhcpv6-server.xml.in +++ b/interface-definitions/service_dhcpv6-server.xml.in @@ -9,6 +9,7 @@ #include + #include Additional global parameters for DHCPv6 server -- cgit v1.2.3