Commit 7cfc5d3f authored by Thomas Markwalder's avatar Thomas Markwalder
Browse files

[#35,!517] Addressed review comments

Addressed a myriad of minor typos and wording issues.

modified:
ChangeLog
doc/examples/kea4/all-keys.json
doc/examples/kea6/all-keys.json
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp6-srv.rst
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp4/tests/config_parser_unittest.cc
src/bin/dhcp4/tests/fqdn_unittest.cc
src/bin/dhcp6/tests/config_parser_unittest.cc
src/bin/dhcp6/tests/d2_unittest.cc
src/bin/dhcp6/tests/fqdn_unittest.cc
src/lib/dhcpsrv/alloc_engine.cc
src/lib/dhcpsrv/alloc_engine.h
src/lib/dhcpsrv/d2_client_cfg.h
src/lib/dhcpsrv/parsers/base_network_parser.cc
src/lib/dhcpsrv/srv_config.h
parent 9635e5fc
...@@ -99,6 +99,7 @@ ...@@ -99,6 +99,7 @@
}, },
// Specifies a prefix to be prepended to the generated Client FQDN. // Specifies a prefix to be prepended to the generated Client FQDN.
// It may be specified at the global, shared-network and subnet levels.
"ddns-generated-prefix": "myhost", "ddns-generated-prefix": "myhost",
// Boolean flag indicating that server should ignore DHCP client // Boolean flag indicating that server should ignore DHCP client
...@@ -106,18 +107,21 @@ ...@@ -106,18 +107,21 @@
// the server will send DNS updates for both forward and // the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates // reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when // that the server will delegate DNS update to the client when
// requested. // requested. It may be specified at the global, shared-network
// and subnet levels.
"ddns-override-client-update": false, "ddns-override-client-update": false,
// Boolean flag indicating that the server should override DHCP // Boolean flag indicating that the server should override DHCP
// client's wish to not update the DNS. With this parameter // client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when // set to true the server will send DNS update even when
// the client requested no update. // the client requested no update. It may be specified at the
// global, shared-network and subnet levels.
"ddns-override-no-update": false, "ddns-override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The // Suffix appended to the partial name sent to the DNS. The
// default value is an empty string which indicates that no // default value is an empty string which indicates that no
// suffix is appended. // suffix is appended. It may be specified at the global,
// shared-network and subnet levels.
"ddns-qualifying-suffix": "", "ddns-qualifying-suffix": "",
// Enumeration specifying whether the server should honor // Enumeration specifying whether the server should honor
...@@ -128,14 +132,15 @@ ...@@ -128,14 +132,15 @@
// sent, but do not generate one when the client didn't sent // sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when // the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the // client didn't send one, otherwise leave the name the
// client sent). The default value is "never". // client sent). The default value is "never". It may be
// specified at the global, shared-network and subnet levels.
"ddns-replace-client-name": "never", "ddns-replace-client-name": "never",
// Boolean flag which enables or disables the DDNS updating. It // Boolean flag which enables or disables the DDNS updating. It
// defaults to true. It may be specified at the global, shared- // defaults to true. It may be specified at the global, shared-
// network and subnet levels. It works in conjunction with // network and subnet levels. It works in conjunction with
// dhcp-ddns:enable-updates which must be true enable connectivity // dhcp-ddns:enable-updates which must be true to enable connectivity
// kea-dhcp-ddns.. // to kea-dhcp-ddns.
"ddns-send-updates": true, "ddns-send-updates": true,
// Time in seconds specifying how long a declined lease should be // Time in seconds specifying how long a declined lease should be
...@@ -177,7 +182,20 @@ ...@@ -177,7 +182,20 @@
"server-ip": "127.0.0.1", "server-ip": "127.0.0.1",
// Port number on which D2 listens for NCRs. // Port number on which D2 listens for NCRs.
"server-port": 53001 "server-port": 53001,
// The follow parameters are DEPRECATED. They have been
// replaced with parameters that may be set at the global,
// shared-network, and subnet4 scopes. They are listed here
// as configuration parsing still accepts them. Eventually
// support for them will be removed.
"generated-prefix": "myhost",
"hostname-char-replacement": "x",
"hostname-char-set": "[^A-Za-z0-9.-]",
"override-client-update": false,
"override-no-update": false,
"qualifying-suffix": "",
"replace-client-name": "never"
}, },
// Specifies the first of the two consecutive ports of the UDP // Specifies the first of the two consecutive ports of the UDP
...@@ -520,53 +538,28 @@ ...@@ -520,53 +538,28 @@
// empty string is provided, no restriction is applied. // empty string is provided, no restriction is applied.
"client-class": "", "client-class": "",
// Specifies a prefix to be prepended to the generated Client FQDN. // Shared network level value. See description at the global level.
"ddns-generated-prefix": "myhost", "ddns-generated-prefix": "myhost",
// Boolean flag indicating that server should ignore DHCP client // Shared network level value. See description at the global level.
// wishes to update DNS on its own. With that flag set to true
// the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when
// requested.
"ddns-override-client-update": false, "ddns-override-client-update": false,
// Boolean flag indicating that the server should override DHCP // Shared network level value. See description at the global level.
// client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when
// the client requested no update.
"ddns-override-no-update": false, "ddns-override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The // Shared network level value. See description at the global level.
// default value is an empty string which indicates that no
// suffix is appended.
"ddns-qualifying-suffix": "", "ddns-qualifying-suffix": "",
// Enumeration specifying whether the server should honor // Shared network level value. See description at the global level.
// hostname or Client FQDN sent by the client or replace
// this name. The acceptable values are: "never" (use the
// name the client sent), "always" (replace the name the
// client sent), "when-present" (replace the name the client
// sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the
// client sent). The default value is "never".
"ddns-replace-client-name": "never", "ddns-replace-client-name": "never",
// Boolean flag which enables or disables DDNS updating for // Shared network level value. See description at the global level.
// subnets in this network. It works in conjunction with
// dhcp-ddns:enable-updates which must be true enable connectivity
// kea-dhcp-ddns. The default value is "true".
"ddns-send-updates": true, "ddns-send-updates": true,
// String of zero or more characters with which to replace each // Shared network level value. See description at the global level.
// invalid character in the hostname or Client FQDN. The default
// value is an empty string which will cause invalid characters
// to be omitted rather than replaced.
"hostname-char-replacement": "x", "hostname-char-replacement": "x",
// Regular expression describing the invalid character set in // Shared network level value. See description at the global level.
// the hostname or Client FQDN.
"hostname-char-set": "[^A-Za-z0-9.-]", "hostname-char-set": "[^A-Za-z0-9.-]",
// Specifies that this shared network is selected for the // Specifies that this shared network is selected for the
...@@ -640,53 +633,28 @@ ...@@ -640,53 +633,28 @@
// provided, no restriction is applied. // provided, no restriction is applied.
"client-class": "", "client-class": "",
// Specifies a prefix to be prepended to the generated Client FQDN. // Subnet level value. See description at the global level.
"ddns-generated-prefix": "myhost", "ddns-generated-prefix": "myhost",
// Boolean flag indicating that server should ignore DHCP client // Subnet level value. See description at the global level.
// wishes to update DNS on its own. With that flag set to true
// the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when
// requested.
"ddns-override-client-update": false, "ddns-override-client-update": false,
// Boolean flag indicating that the server should override DHCP // Subnet level value. See description at the global level.
// client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when
// the client requested no update.
"ddns-override-no-update": false, "ddns-override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The // Subnet level value. See description at the global level.
// default value is an empty string which indicates that no
// suffix is appended.
"ddns-qualifying-suffix": "", "ddns-qualifying-suffix": "",
// Enumeration specifying whether the server should honor // Subnet level value. See description at the global level.
// hostname or Client FQDN sent by the client or replace
// this name. The acceptable values are: "never" (use the
// name the client sent), "always" (replace the name the
// client sent), "when-present" (replace the name the client
// sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the
// client sent). The default value is "never".
"ddns-replace-client-name": "never", "ddns-replace-client-name": "never",
// Boolean flag which enables or disables DDNS updating for // Subnet level value. See description at the global level.
// subnets in this network. It works in conjunction with
// dhcp-ddns:enable-updates which must be true enable connectivity
// kea-dhcp-ddns. The default value is "true".
"ddns-send-updates": true, "ddns-send-updates": true,
// String of zero or more characters with which to replace each // Subnet level value. See description at the global level.
// invalid character in the hostname or Client FQDN. The default
// value is an empty string which will cause invalid characters
// to be omitted rather than replaced.
"hostname-char-replacement": "x", "hostname-char-replacement": "x",
// Regular expression describing the invalid character set in // Subnet level value. See description at the global level.
// the hostname or Client FQDN.
"hostname-char-set": "[^A-Za-z0-9.-]", "hostname-char-set": "[^A-Za-z0-9.-]",
// Subnet unique identifier. // Subnet unique identifier.
......
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
}, },
// Specifies a prefix to be prepended to the generated Client FQDN. // Specifies a prefix to be prepended to the generated Client FQDN.
// It may be specified at the global, shared-network and subnet levels.
"ddns-generated-prefix": "myhost", "ddns-generated-prefix": "myhost",
// Boolean flag indicating that server should ignore DHCP client // Boolean flag indicating that server should ignore DHCP client
...@@ -71,18 +72,21 @@ ...@@ -71,18 +72,21 @@
// the server will send DNS updates for both forward and // the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates // reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when // that the server will delegate DNS update to the client when
// requested. // requested. It may be specified at the global, shared-network
// and subnet levels.
"ddns-override-client-update": false, "ddns-override-client-update": false,
// Boolean flag indicating that the server should override DHCP // Boolean flag indicating that the server should override DHCP
// client's wish to not update the DNS. With this parameter // client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when // set to true the server will send DNS update even when
// the client requested no update. // the client requested no update. It may be specified at the
// global, shared-network and subnet levels.
"ddns-override-no-update": false, "ddns-override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The // Suffix appended to the partial name sent to the DNS. The
// default value is an empty string which indicates that no // default value is an empty string which indicates that no
// suffix is appended. // suffix is appended. It may be specified at the global,
// shared-network and subnet levels.
"ddns-qualifying-suffix": "", "ddns-qualifying-suffix": "",
// Enumeration specifying whether the server should honor // Enumeration specifying whether the server should honor
...@@ -93,14 +97,15 @@ ...@@ -93,14 +97,15 @@
// sent, but do not generate one when the client didn't sent // sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when // the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the // client didn't send one, otherwise leave the name the
// client sent). The default value is "never". // client sent). The default value is "never". It may be
// specified at the global, shared-network and subnet levels.
"ddns-replace-client-name": "never", "ddns-replace-client-name": "never",
// Boolean flag which enables or disables the DDNS updating. It // Boolean flag which enables or disables the DDNS updating. It
// defaults to true. It may be specified at the global, shared- // defaults to true. It may be specified at the global, shared-
// network and subnet levels. It works in conjunction with // network and subnet levels. It works in conjunction with
// dhcp-ddns:enable-updates which must be true enable connectivity // dhcp-ddns:enable-updates which must be true to enable connectivity
// kea-dhcp-ddns.. // to kea-dhcp-ddns.
"ddns-send-updates": true, "ddns-send-updates": true,
// Time in seconds specifying how long a declined lease should be // Time in seconds specifying how long a declined lease should be
...@@ -141,7 +146,20 @@ ...@@ -141,7 +146,20 @@
"server-ip": "::1", "server-ip": "::1",
// Port number on which D2 listens for NCRs. // Port number on which D2 listens for NCRs.
"server-port": 53001 "server-port": 53001,
// The follow parameters are DEPRECATED. They have been
// replaced with parameters that may be set at the global,
// shared-network, and subnet6 scopes. They are listed here
// as configuration parsing still accepts them. Eventually
// support for them will be removed.
"generated-prefix": "myhost",
"hostname-char-replacement": "x",
"hostname-char-set": "[^A-Za-z0-9.-]",
"override-client-update": false,
"override-no-update": false,
"qualifying-suffix": "",
"replace-client-name": "never"
}, },
// Specifies the first of the two consecutive ports of the UDP // Specifies the first of the two consecutive ports of the UDP
...@@ -473,53 +491,28 @@ ...@@ -473,53 +491,28 @@
// empty string is provided, no restriction is applied. // empty string is provided, no restriction is applied.
"client-class": "", "client-class": "",
// Specifies a prefix to be prepended to the generated Client FQDN. // Shared network level value. See description at the global level.
"ddns-generated-prefix": "myhost", "ddns-generated-prefix": "myhost",
// Boolean flag indicating that server should ignore DHCP client // Shared network level value. See description at the global level.
// wishes to update DNS on its own. With that flag set to true
// the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when
// requested.
"ddns-override-client-update": false, "ddns-override-client-update": false,
// Boolean flag indicating that the server should override DHCP // Shared network level value. See description at the global level.
// client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when
// the client requested no update.
"ddns-override-no-update": false, "ddns-override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The // Shared network level value. See description at the global level.
// default value is an empty string which indicates that no
// suffix is appended.
"ddns-qualifying-suffix": "", "ddns-qualifying-suffix": "",
// Enumeration specifying whether the server should honor // Shared network level value. See description at the global level.
// hostname or Client FQDN sent by the client or replace
// this name. The acceptable values are: "never" (use the
// name the client sent), "always" (replace the name the
// client sent), "when-present" (replace the name the client
// sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the
// client sent). The default value is "never".
"ddns-replace-client-name": "never", "ddns-replace-client-name": "never",
// Boolean flag which enables or disables DDNS updating for // Shared network level value. See description at the global level.
// subnets in this network. It works in conjunction with
// dhcp-ddns:enable-updates which must be true enable connectivity
// kea-dhcp-ddns. The default value is "true".
"ddns-send-updates": true, "ddns-send-updates": true,
// String of zero or more characters with which to replace each // Shared network level value. See description at the global level.
// invalid character in the Client FQDN. The default
// value is an empty string which will cause invalid characters
// to be omitted rather than replaced.
"hostname-char-replacement": "x", "hostname-char-replacement": "x",
// Regular expression describing the invalid character set in // Shared network level value. See description at the global level.
// the Client FQDN.
"hostname-char-set": "[^A-Za-z0-9.-]", "hostname-char-set": "[^A-Za-z0-9.-]",
// Specifies that this shared network is selected for the // Specifies that this shared network is selected for the
...@@ -588,53 +581,28 @@ ...@@ -588,53 +581,28 @@
// provided, no restriction is applied. // provided, no restriction is applied.
"client-class": "", "client-class": "",
// Specifies a prefix to be prepended to the generated Client FQDN. // Subnet level value. See description at the global level.
"ddns-generated-prefix": "myhost", "ddns-generated-prefix": "myhost",
// Boolean flag indicating that server should ignore DHCP client // Subnet level value. See description at the global level.
// wishes to update DNS on its own. With that flag set to true
// the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when
// requested.
"ddns-override-client-update": false, "ddns-override-client-update": false,
// Boolean flag indicating that the server should override DHCP // Subnet level value. See description at the global level.
// client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when
// the client requested no update.
"ddns-override-no-update": false, "ddns-override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The // Subnet level value. See description at the global level.
// default value is an empty string which indicates that no
// suffix is appended.
"ddns-qualifying-suffix": "", "ddns-qualifying-suffix": "",
// Enumeration specifying whether the server should honor // Subnet level value. See description at the global level.
// hostname or Client FQDN sent by the client or replace
// this name. The acceptable values are: "never" (use the
// name the client sent), "always" (replace the name the
// client sent), "when-present" (replace the name the client
// sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the
// client sent). The default value is "never".
"ddns-replace-client-name": "never", "ddns-replace-client-name": "never",
// Boolean flag which enables or disables DDNS updating for // Subnet level value. See description at the global level.
// subnets in this network. It works in conjunction with
// dhcp-ddns:enable-updates which must be true enable connectivity
// kea-dhcp-ddns. The default value is "true".
"ddns-send-updates": true, "ddns-send-updates": true,
// String of zero or more characters with which to replace each // Subnet level value. See description at the global level.
// invalid character in the Client FQDN. The default
// value is an empty string which will cause invalid characters
// to be omitted rather than replaced.
"hostname-char-replacement": "x", "hostname-char-replacement": "x",
// Regular expression describing the invalid character set in // Subnet level value. See description at the global level.
// the or Client FQDN.
"hostname-char-set": "[^A-Za-z0-9.-]", "hostname-char-set": "[^A-Za-z0-9.-]",
// Subnet unique identifier. // Subnet unique identifier.
......
...@@ -2812,7 +2812,7 @@ NCRs. Each NCR contains the following information: ...@@ -2812,7 +2812,7 @@ NCRs. Each NCR contains the following information:
(information identifying the client associated with the FQDN) (information identifying the client associated with the FQDN)
Prior to Kea 1.7.1, all parameters for controlling DDNS were within the Prior to Kea 1.7.1, all parameters for controlling DDNS were within the
global, ``dhcp-ddns`` section of the kea-dhcp4. Beginning with Kea 1.7.1 global ``dhcp-ddns`` section of the kea-dhcp4. Beginning with Kea 1.7.1
DDNS related parameters were split into two groups: DDNS related parameters were split into two groups:
1. Connectivity Parameters 1. Connectivity Parameters
...@@ -2856,7 +2856,7 @@ DDNS related parameters were split into two groups: ...@@ -2856,7 +2856,7 @@ DDNS related parameters were split into two groups:
parameter is specified both globally and in ``dhcp-ddns``, the latter parameter is specified both globally and in ``dhcp-ddns``, the latter
value will be ignored. In either case, a log will be emitted explaining value will be ignored. In either case, a log will be emitted explaining
what has occurred. Specifying these values within ``dhcp-ddns`` is what has occurred. Specifying these values within ``dhcp-ddns`` is
deprecated and support for it may be removed at some future date. deprecated and support for it will be removed at some future date.
The default configuration would appear as follows: The default configuration would appear as follows: