From bda4784c4831980d06d6ded08268cd590a6bfa0e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 5 Oct 2020 19:17:51 +0200 Subject: dhcp(v6)-server: T2961: use fqdn validator wnd move to include snipped Migrate the domain-search node (which occurs three times) to an includable snippet. Also re-use the fqdn validator to keep the regex patterns to as few locations as possible. --- interface-definitions/dhcp-server.xml.in | 13 ++++++------- interface-definitions/dhcpv6-server.xml.in | 22 ++-------------------- .../include/dhcp-server-domain-search.xml.i | 12 ++++++++++++ 3 files changed, 20 insertions(+), 27 deletions(-) create mode 100644 interface-definitions/include/dhcp-server-domain-search.xml.i (limited to 'interface-definitions') diff --git a/interface-definitions/dhcp-server.xml.in b/interface-definitions/dhcp-server.xml.in index e8bdff3df..ca8abc036 100644 --- a/interface-definitions/dhcp-server.xml.in +++ b/interface-definitions/dhcp-server.xml.in @@ -140,15 +140,14 @@ - Client domain name - - - - - Client domain search - + Client Domain Name + + + + Invalid domain name (RFC 1123 section 2).\nMay only contain letters, numbers and .-_ + #include IP address to exclude from DHCP lease range diff --git a/interface-definitions/dhcpv6-server.xml.in b/interface-definitions/dhcpv6-server.xml.in index acc33d40f..0b4bcf9ea 100644 --- a/interface-definitions/dhcpv6-server.xml.in +++ b/interface-definitions/dhcpv6-server.xml.in @@ -60,16 +60,7 @@ - - - Domain name for client to search - - [-_a-zA-Z0-9.]+ - - Invalid domain name. May only contain letters, numbers and .-_ - - - + #include IPv6 address of a Recursive DNS Server @@ -150,16 +141,7 @@ - - - Domain name for client to search - - [-_a-zA-Z0-9.]+ - - Invalid domain name. May only contain letters, numbers and .-_ - - - + #include Parameters relating to the lease time diff --git a/interface-definitions/include/dhcp-server-domain-search.xml.i b/interface-definitions/include/dhcp-server-domain-search.xml.i new file mode 100644 index 000000000..8b76c4e70 --- /dev/null +++ b/interface-definitions/include/dhcp-server-domain-search.xml.i @@ -0,0 +1,12 @@ + + + + Client Domain Name search list + + + + Invalid domain name (RFC 1123 section 2).\nMay only contain letters, numbers and .-_ + + + + -- cgit v1.2.3