summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-09 21:35:50 +0100
committerGitHub <noreply@github.com>2023-12-09 21:35:50 +0100
commit2778f53cc1f9f03a6c145e45082ca95ba21a1a96 (patch)
treef4d1b4e9d811447080223198b0a44cdce1d7ea75 /interface-definitions
parentbf096599e4bad8a595257654ec5a0a1c4ae2e15a (diff)
parent2787e7915c1225f05f1e07c62f7c4d1ac9dca5ac (diff)
downloadvyos-1x-2778f53cc1f9f03a6c145e45082ca95ba21a1a96.tar.gz
vyos-1x-2778f53cc1f9f03a6c145e45082ca95ba21a1a96.zip
Merge pull request #1960 from sarthurdev/kea
dhcp: T3316: Migrate dhcp/dhcpv6 server to Kea
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/dhcp-server.xml.in52
-rw-r--r--interface-definitions/dhcpv6-server.xml.in52
-rw-r--r--interface-definitions/include/dhcp/captive-portal.xml.i11
-rw-r--r--interface-definitions/include/dhcp/ping-check.xml.i8
-rw-r--r--interface-definitions/include/version/dhcp-server-version.xml.i2
-rw-r--r--interface-definitions/include/version/dhcpv6-server-version.xml.i2
6 files changed, 58 insertions, 69 deletions
diff --git a/interface-definitions/dhcp-server.xml.in b/interface-definitions/dhcp-server.xml.in
index 583de7ba9..081f7ed42 100644
--- a/interface-definitions/dhcp-server.xml.in
+++ b/interface-definitions/dhcp-server.xml.in
@@ -63,26 +63,16 @@
<constraintErrorMessage>Invalid DHCP failover peer status</constraintErrorMessage>
</properties>
</leafNode>
+ #include <include/pki/ca-certificate.xml.i>
+ #include <include/pki/certificate.xml.i>
</children>
</node>
- <leafNode name="global-parameters">
- <properties>
- <help>Additional global parameters for DHCP server. You must use the syntax of dhcpd.conf in this text-field. Using this without proper knowledge may result in a crashed DHCP server. Check system log to look for errors.</help>
- <multi/>
- </properties>
- </leafNode>
<leafNode name="hostfile-update">
<properties>
<help>Updating /etc/hosts file (per client lease)</help>
<valueless/>
</properties>
</leafNode>
- <leafNode name="host-decl-name">
- <properties>
- <help>Use host declaration name for forward DNS name</help>
- <valueless/>
- </properties>
- </leafNode>
#include <include/listen-address-ipv4.xml.i>
<tagNode name="shared-network-name">
<properties>
@@ -102,16 +92,9 @@
#include <include/dhcp/domain-name.xml.i>
#include <include/dhcp/domain-search.xml.i>
#include <include/dhcp/ntp-server.xml.i>
- #include <include/dhcp/ping-check.xml.i>
#include <include/generic-description.xml.i>
#include <include/generic-disable-node.xml.i>
#include <include/name-server-ipv4.xml.i>
- <leafNode name="shared-network-parameters">
- <properties>
- <help>Additional shared-network parameters for DHCP server. You must use the syntax of dhcpd.conf in this text-field. Using this without proper knowledge may result in a crashed DHCP server. Check system log to look for errors.</help>
- <multi/>
- </properties>
- </leafNode>
<tagNode name="subnet">
<properties>
<help>DHCP subnet for shared network</help>
@@ -162,6 +145,7 @@
</constraint>
</properties>
</leafNode>
+ #include <include/dhcp/captive-portal.xml.i>
<leafNode name="client-prefix-length">
<properties>
<help>Specifies the clients subnet mask as per RFC 950. If unset, subnet declaration is used.</help>
@@ -191,12 +175,6 @@
#include <include/dhcp/domain-search.xml.i>
#include <include/generic-description.xml.i>
#include <include/name-server-ipv4.xml.i>
- <leafNode name="enable-failover">
- <properties>
- <help>Enable DHCP failover support for this subnet</help>
- <valueless/>
- </properties>
- </leafNode>
<leafNode name="exclude">
<properties>
<help>IP address to exclude from DHCP lease range</help>
@@ -231,7 +209,6 @@
<defaultValue>86400</defaultValue>
</leafNode>
#include <include/dhcp/ntp-server.xml.i>
- #include <include/dhcp/ping-check.xml.i>
<leafNode name="pop-server">
<properties>
<help>IP address of POP3 server</help>
@@ -339,12 +316,6 @@
</constraint>
</properties>
</leafNode>
- <leafNode name="static-mapping-parameters">
- <properties>
- <help>Additional static-mapping parameters for DHCP server. Will be placed inside the "host" block of the mapping. You must use the syntax of dhcpd.conf in this text-field. Using this without proper knowledge may result in a crashed DHCP server. Check system log to look for errors.</help>
- <multi/>
- </properties>
- </leafNode>
</children>
</tagNode>
<tagNode name="static-route">
@@ -386,12 +357,6 @@
<constraintErrorMessage>Seconds must be between 0 and 4294967295 (49 days)</constraintErrorMessage>
</properties>
</leafNode>
- <leafNode name="subnet-parameters">
- <properties>
- <help>Additional subnet parameters for DHCP server. You must use the syntax of dhcpd.conf in this text-field. Using this without proper knowledge may result in a crashed DHCP server. Check system log to look for errors.</help>
- <multi/>
- </properties>
- </leafNode>
<leafNode name="tftp-server-name">
<properties>
<help>TFTP server name</help>
@@ -435,6 +400,17 @@
<multi/>
</properties>
</leafNode>
+ <leafNode name="time-zone">
+ <properties>
+ <help>Time zone to send to clients. Uses RFC4833 options 100 and 101</help>
+ <completionHelp>
+ <script>timedatectl list-timezones</script>
+ </completionHelp>
+ <constraint>
+ <validator name="timezone" argument="--validate"/>
+ </constraint>
+ </properties>
+ </leafNode>
<node name="vendor-option">
<properties>
<help>Vendor Specific Options</help>
diff --git a/interface-definitions/dhcpv6-server.xml.in b/interface-definitions/dhcpv6-server.xml.in
index 9dff68a24..b37f79434 100644
--- a/interface-definitions/dhcpv6-server.xml.in
+++ b/interface-definitions/dhcpv6-server.xml.in
@@ -41,6 +41,21 @@
<children>
#include <include/generic-disable-node.xml.i>
#include <include/generic-description.xml.i>
+ <leafNode name="interface">
+ <properties>
+ <help>Optional interface for this shared network to accept requests from</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces</script>
+ </completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Interface name</description>
+ </valueHelp>
+ <constraint>
+ #include <include/constraint/interface-name.xml.i>
+ </constraint>
+ </properties>
+ </leafNode>
<node name="common-options">
<properties>
<help>Common options to distribute to all clients, including stateless clients</help>
@@ -79,7 +94,7 @@
<help>Parameters setting ranges for assigning IPv6 addresses</help>
</properties>
<children>
- <tagNode name="prefix">
+ <leafNode name="prefix">
<properties>
<help>IPv6 prefix defining range of addresses to assign</help>
<valueHelp>
@@ -89,16 +104,9 @@
<constraint>
<validator name="ipv6-prefix"/>
</constraint>
+ <multi/>
</properties>
- <children>
- <leafNode name="temporary">
- <properties>
- <help>Address range will be used for temporary addresses</help>
- <valueless/>
- </properties>
- </leafNode>
- </children>
- </tagNode>
+ </leafNode>
<tagNode name="start">
<properties>
<help>First in range of consecutive IPv6 addresses to assign</help>
@@ -127,6 +135,7 @@
</tagNode>
</children>
</node>
+ #include <include/dhcp/captive-portal.xml.i>
#include <include/dhcp/domain-search.xml.i>
<node name="lease-time">
<properties>
@@ -221,12 +230,12 @@
<help>Parameters relating to IPv6 prefix delegation</help>
</properties>
<children>
- <tagNode name="start">
+ <tagNode name="prefix">
<properties>
- <help>First in range of IPv6 addresses to be used in prefix delegation</help>
+ <help>IPv6 prefix to be used in prefix delegation</help>
<valueHelp>
<format>ipv6</format>
- <description>IPv6 address used in prefix delegation</description>
+ <description>IPv6 prefix used in prefix delegation</description>
</valueHelp>
<constraint>
<validator name="ipv6-address"/>
@@ -235,27 +244,28 @@
<children>
<leafNode name="prefix-length">
<properties>
- <help>Length in bits of prefixes to be delegated</help>
+ <help>Length in bits of prefix</help>
<valueHelp>
<format>u32:32-64</format>
- <description>Delagated prefix length (32-64)</description>
+ <description>Prefix length (32-64)</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 32-64"/>
</constraint>
- <constraintErrorMessage>Delegated prefix length must be between 32 and 64</constraintErrorMessage>
+ <constraintErrorMessage>Prefix length must be between 32 and 64</constraintErrorMessage>
</properties>
</leafNode>
- <leafNode name="stop">
+ <leafNode name="delegated-length">
<properties>
- <help>Last in range of IPv6 addresses to be used in prefix delegation</help>
+ <help>Length in bits of prefixes to be delegated</help>
<valueHelp>
- <format>ipv6</format>
- <description>IPv6 address used in prefix delegation</description>
+ <format>u32:32-64</format>
+ <description>Delegated prefix length (32-64)</description>
</valueHelp>
<constraint>
- <validator name="ipv6-address"/>
+ <validator name="numeric" argument="--range 32-96"/>
</constraint>
+ <constraintErrorMessage>Delegated prefix length must be between 32 and 96</constraintErrorMessage>
</properties>
</leafNode>
</children>
diff --git a/interface-definitions/include/dhcp/captive-portal.xml.i b/interface-definitions/include/dhcp/captive-portal.xml.i
new file mode 100644
index 000000000..643f055a8
--- /dev/null
+++ b/interface-definitions/include/dhcp/captive-portal.xml.i
@@ -0,0 +1,11 @@
+<!-- include start from dhcp/captive-portal.xml.i -->
+<leafNode name="captive-portal">
+ <properties>
+ <help>Captive portal API endpoint</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Captive portal API endpoint</description>
+ </valueHelp>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/dhcp/ping-check.xml.i b/interface-definitions/include/dhcp/ping-check.xml.i
deleted file mode 100644
index a506f68e4..000000000
--- a/interface-definitions/include/dhcp/ping-check.xml.i
+++ /dev/null
@@ -1,8 +0,0 @@
-<!-- include start from dhcp/ping-check.xml.i -->
-<leafNode name="ping-check">
- <properties>
- <help>Sends ICMP Echo request to the address being assigned</help>
- <valueless/>
- </properties>
-</leafNode>
-<!-- include end -->
diff --git a/interface-definitions/include/version/dhcp-server-version.xml.i b/interface-definitions/include/version/dhcp-server-version.xml.i
index 330cb7d1b..7c4b5633e 100644
--- a/interface-definitions/include/version/dhcp-server-version.xml.i
+++ b/interface-definitions/include/version/dhcp-server-version.xml.i
@@ -1,3 +1,3 @@
<!-- include start from include/version/dhcp-server-version.xml.i -->
-<syntaxVersion component='dhcp-server' version='6'></syntaxVersion>
+<syntaxVersion component='dhcp-server' version='7'></syntaxVersion>
<!-- include end -->
diff --git a/interface-definitions/include/version/dhcpv6-server-version.xml.i b/interface-definitions/include/version/dhcpv6-server-version.xml.i
index 4b2cf40aa..ae4178c90 100644
--- a/interface-definitions/include/version/dhcpv6-server-version.xml.i
+++ b/interface-definitions/include/version/dhcpv6-server-version.xml.i
@@ -1,3 +1,3 @@
<!-- include start from include/version/dhcpv6-server-version.xml.i -->
-<syntaxVersion component='dhcpv6-server' version='1'></syntaxVersion>
+<syntaxVersion component='dhcpv6-server' version='2'></syntaxVersion>
<!-- include end -->