]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#35,!517] Addressed review comments
authorThomas Markwalder <tmark@isc.org>
Wed, 9 Oct 2019 19:08:19 +0000 (15:08 -0400)
committerThomas Markwalder <tmark@isc.org>
Thu, 10 Oct 2019 12:36:39 +0000 (08:36 -0400)
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

15 files changed:
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

index e620874587b1f7947f9d1a3d40e2403ea12c7559..8ead75e0372c30afdcac0af02d93a37192d1565a 100644 (file)
@@ -99,6 +99,7 @@
         },
 
         // 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",
 
         // Boolean flag indicating that server should ignore DHCP client
         // 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.
+        // requested. It may be specified at the global, shared-network
+        // and subnet levels.
         "ddns-override-client-update": false,
 
         // Boolean flag indicating that the server should override DHCP
         // 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.
+        // the client requested no update.  It may be specified at the
+        // global, shared-network and subnet levels.
         "ddns-override-no-update": false,
 
         // Suffix appended to the partial name sent to the DNS. The
         // 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": "",
 
         // Enumeration specifying whether the server should honor
         // 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".
+        // client sent). The default value is "never".  It may be
+        // specified at the global, shared-network and subnet levels.
         "ddns-replace-client-name": "never",
 
         // Boolean flag which enables or disables the DDNS updating. It
         // defaults to true.  It may be specified at the global, shared-
         // network and subnet levels. It works in conjunction with
-        // dhcp-ddns:enable-updates which must be true enable connectivity
-        // kea-dhcp-ddns..
+        // dhcp-ddns:enable-updates which must be true to enable connectivity
+        // to kea-dhcp-ddns.
         "ddns-send-updates": true,
 
         // Time in seconds specifying how long a declined lease should be
             "server-ip": "127.0.0.1",
 
             // 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
                 // empty string is provided, no restriction is applied.
                 "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",
 
-                // Boolean flag indicating that server should ignore DHCP client
-                // 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.
+                // Shared network level value. See description at the global level.
                 "ddns-override-client-update": false,
 
-                // Boolean flag indicating that the server should override DHCP
-                // 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.
+                // Shared network level value. See description at the global level.
                 "ddns-override-no-update": false,
 
-                // Suffix appended to the partial name sent to the DNS. The
-                // default value is an empty string which indicates that no
-                // suffix is appended.
+                // Shared network level value. See description at the global level.
                 "ddns-qualifying-suffix": "",
 
-                // Enumeration specifying whether the server should honor
-                // 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".
+                // Shared network level value. See description at the global level.
                 "ddns-replace-client-name": "never",
 
-                // Boolean flag which enables or disables DDNS updating for
-                // 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".
+                // Shared network level value. See description at the global level.
                 "ddns-send-updates": true,
 
-                // String of zero or more characters with which to replace each
-                // 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.
+                // Shared network level value. See description at the global level.
                 "hostname-char-replacement": "x",
 
-                // Regular expression describing the invalid character set in
-                // the hostname or Client FQDN.
+                // Shared network level value. See description at the global level.
                 "hostname-char-set": "[^A-Za-z0-9.-]",
 
                 // Specifies that this shared network is selected for the
                         // provided, no restriction is applied.
                         "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",
 
-                        // Boolean flag indicating that server should ignore DHCP client
-                        // 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.
+                        // Subnet level value. See description at the global level.
                         "ddns-override-client-update": false,
 
-                        // Boolean flag indicating that the server should override DHCP
-                        // 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.
+                        // Subnet level value. See description at the global level.
                         "ddns-override-no-update": false,
 
-                        // Suffix appended to the partial name sent to the DNS. The
-                        // default value is an empty string which indicates that no
-                        // suffix is appended.
+                        // Subnet level value. See description at the global level.
                         "ddns-qualifying-suffix": "",
 
-                        // Enumeration specifying whether the server should honor
-                        // 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".
+                        // Subnet level value. See description at the global level.
                         "ddns-replace-client-name": "never",
 
-                        // Boolean flag which enables or disables DDNS updating for
-                        // 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".
+                        // Subnet level value. See description at the global level.
                         "ddns-send-updates": true,
 
-                        // String of zero or more characters with which to replace each
-                        // 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.
+                        // Subnet level value. See description at the global level.
                         "hostname-char-replacement": "x",
 
-                        // Regular expression describing the invalid character set in
-                        // the hostname or Client FQDN.
+                        // Subnet level value. See description at the global level.
                         "hostname-char-set": "[^A-Za-z0-9.-]",
 
                         // Subnet unique identifier.
index 513e20d0cb29b739bd07a0a18618c836c8b8db67..a5e5bb65f7a1da91bff5b361dfa04dccadbad285 100644 (file)
@@ -64,6 +64,7 @@
         },
 
         // 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",
 
         // Boolean flag indicating that server should ignore DHCP client
         // 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.
+        // requested.  It may be specified at the global, shared-network
+        // and subnet levels.
         "ddns-override-client-update": false,
 
         // Boolean flag indicating that the server should override DHCP
         // 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.
+        // the client requested no update.  It may be specified at the
+        // global, shared-network and subnet levels.
         "ddns-override-no-update": false,
 
         // Suffix appended to the partial name sent to the DNS. The
         // 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": "",
 
         // Enumeration specifying whether the server should honor
         // 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".
+        // client sent). The default value is "never".  It may be
+        // specified at the global, shared-network and subnet levels.
         "ddns-replace-client-name": "never",
 
         // Boolean flag which enables or disables the DDNS updating. It
         // defaults to true.  It may be specified at the global, shared-
         // network and subnet levels. It works in conjunction with
-        // dhcp-ddns:enable-updates which must be true enable connectivity
-        // kea-dhcp-ddns..
+        // dhcp-ddns:enable-updates which must be true to enable connectivity
+        // to kea-dhcp-ddns.
         "ddns-send-updates": true,
 
         // Time in seconds specifying how long a declined lease should be
             "server-ip": "::1",
 
             // 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
                 // empty string is provided, no restriction is applied.
                 "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",
 
-                // Boolean flag indicating that server should ignore DHCP client
-                // 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.
+                // Shared network level value. See description at the global level.
                 "ddns-override-client-update": false,
 
-                // Boolean flag indicating that the server should override DHCP
-                // 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.
+                // Shared network level value. See description at the global level.
                 "ddns-override-no-update": false,
 
-                // Suffix appended to the partial name sent to the DNS. The
-                // default value is an empty string which indicates that no
-                // suffix is appended.
+                // Shared network level value. See description at the global level.
                 "ddns-qualifying-suffix": "",
 
-                // Enumeration specifying whether the server should honor
-                // 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".
+                // Shared network level value. See description at the global level.
                 "ddns-replace-client-name": "never",
 
-                // Boolean flag which enables or disables DDNS updating for
-                // 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".
+                // Shared network level value. See description at the global level.
                 "ddns-send-updates": true,
 
-                // String of zero or more characters with which to replace each
-                // invalid character in the Client FQDN. The default
-                // value is an empty string which will cause invalid characters
-                // to be omitted rather than replaced.
+                // Shared network level value. See description at the global level.
                 "hostname-char-replacement": "x",
 
-                // Regular expression describing the invalid character set in
-                // the Client FQDN.
+                // Shared network level value. See description at the global level.
                 "hostname-char-set": "[^A-Za-z0-9.-]",
 
                 // Specifies that this shared network is selected for the
                         // provided, no restriction is applied.
                         "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",
 
-                        // Boolean flag indicating that server should ignore DHCP client
-                        // 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.
+                        // Subnet level value. See description at the global level.
                         "ddns-override-client-update": false,
 
-                        // Boolean flag indicating that the server should override DHCP
-                        // 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.
+                        // Subnet level value. See description at the global level.
                         "ddns-override-no-update": false,
 
-                        // Suffix appended to the partial name sent to the DNS. The
-                        // default value is an empty string which indicates that no
-                        // suffix is appended.
+                        // Subnet level value. See description at the global level.
                         "ddns-qualifying-suffix": "",
 
-                        // Enumeration specifying whether the server should honor
-                        // 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".
+                        // Subnet level value. See description at the global level.
                         "ddns-replace-client-name": "never",
 
-                        // Boolean flag which enables or disables DDNS updating for
-                        // 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".
+                        // Subnet level value. See description at the global level.
                         "ddns-send-updates": true,
 
-                        // String of zero or more characters with which to replace each
-                        // invalid character in the Client FQDN. The default
-                        // value is an empty string which will cause invalid characters
-                        // to be omitted rather than replaced.
+                        // Subnet level value. See description at the global level.
                         "hostname-char-replacement": "x",
 
-                        // Regular expression describing the invalid character set in
-                        // the or Client FQDN.
+                        // Subnet level value. See description at the global level.
                         "hostname-char-set": "[^A-Za-z0-9.-]",
 
                         // Subnet unique identifier.
index d71630137642ad6822fce68e4a83f88eafc47815..d193859a572984a1d48d4fe9aa4ece0f8e8de3cb 100644 (file)
@@ -2812,7 +2812,7 @@ NCRs. Each NCR contains the following information:
    (information identifying the client associated with the FQDN)
 
 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:
 
 1. Connectivity Parameters
@@ -2856,7 +2856,7 @@ DDNS related parameters were split into two groups:
     parameter is specified both globally and in ``dhcp-ddns``, the latter
     value will be ignored.  In either case, a log will be emitted explaining
     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:
 
@@ -2897,22 +2897,22 @@ together:
 
 .. table:: Enabling and Disabling DDNS Updates
 
-   +-----------------+--------------------+------------------------------+
-   | dhcp-ddns:      | Global             | Outcome                      |
-   | enable-updates  | ddns-send-udpates  |                              |
-   +=================+====================+==============================+
-   | false (default) | false              | no updates at any scope      |
-   +-----------------+--------------------+------------------------------+
-   | false           | true (default)     | no updates at any scope      |
-   +-----------------+--------------------+------------------------------+
-   | true            | false              | updates only at scopes with  |
-   |                 |                    | a local value of true for    |
-   |                 |                    | ddns-enable-updates          |
-   +-----------------+--------------------+------------------------------+
-   | true            | true               | updates at all scopes except |
-   |                 |                    | those with a local value of  |
-   |                 |                    | false for ddns-enble-updates |
-   +-----------------+--------------------+------------------------------+
+   +-----------------+--------------------+-------------------------------+
+   | dhcp-ddns:      | Global             | Outcome                       |
+   | enable-updates  | ddns-send-udpates  |                               |
+   +=================+====================+===============================+
+   | false (default) | false              | no updates at any scope       |
+   +-----------------+--------------------+-------------------------------+
+   | false           | true (default)     | no updates at any scope       |
+   +-----------------+--------------------+-------------------------------+
+   | true            | false              | updates only at scopes with   |
+   |                 |                    | a local value of true for     |
+   |                 |                    | ddns-enable-updates           |
+   +-----------------+--------------------+-------------------------------+
+   | true            | true               | updates at all scopes except  |
+   |                 |                    | those with a local value of   |
+   |                 |                    | false for ddns-enable-updates |
+   +-----------------+--------------------+-------------------------------+
 
 .. _dhcpv4-d2-io-config:
 
index 34929daf2b767e029179d2eb72c4d2b8d962f315..17702a997c15027fca415d7045080ef3c32de1a9 100644 (file)
@@ -2566,13 +2566,13 @@ NCR contains the following information:
    (information identifying the client associated with the FQDN)
 
 Prior to Kea 1.7.1, all parameters for controlling DDNS were within the
-global, ``dhcp-ddns`` section of the kea-dhcp6.  Beginning with Kea 1.7.1
+global ``dhcp-ddns`` section of the kea-dhcp6.  Beginning with Kea 1.7.1
 DDNS related parameters were split into two groups:
 
 1. Connectivity Parameters
-    These are parameters which specify where and how kea-dhcp4 connects to
+    These are parameters which specify where and how kea-dhcp6 connects to
     and communicates with D2.  These parameters can only be specified
-    within the top-level ``dhcp-ddns`` section in the kea-dhcp4
+    within the top-level ``dhcp-ddns`` section in the kea-dhcp6
     configuration.  The connectivity parameters are listed below:
 
     -  ``enable-updates``
@@ -2608,9 +2608,9 @@ DDNS related parameters were split into two groups:
     the original behavioral parameters specified in ``dhcp-ddns``.  It will
     do so by translating the parameter into its global equivalent.  If a
     parameter is specified both globally and in ``dhcp-ddns``, the latter
-    value will be ignored.  In either case, a log will be emitted explaining what
-    has occurred.  Specifying these values within ``dhcp-ddns`` is deprecated
-    and support for it may be removed at some future date.
+    value will be ignored.  In either case, a log will be emitted explaining
+    what has occurred.  Specifying these values within ``dhcp-ddns`` is
+    deprecated and support for it will be removed at some future date.
 
 The default configuration and values would appear as follows:
 
@@ -2651,22 +2651,22 @@ together:
 
 .. table:: Enabling and Disabling DDNS Updates
 
-   +-----------------+--------------------+------------------------------+
-   | dhcp-ddns:      | Global             | Outcome                      |
-   | enable-updates  | ddns-send-udpates  |                              |
-   +=================+====================+==============================+
-   | false (default) | false              | no updates at any scope      |
-   +-----------------+--------------------+------------------------------+
-   | false           | true (default)     | no updates at any scope      |
-   +-----------------+--------------------+------------------------------+
-   | true            | false              | updates only at scopes with  |
-   |                 |                    | a local value of true for    |
-   |                 |                    | ddns-enable-updates          |
-   +-----------------+--------------------+------------------------------+
-   | true            | true               | updates at all scopes except |
-   |                 |                    | those with a local value of  |
-   |                 |                    | false for ddns-enble-updates |
-   +-----------------+--------------------+------------------------------+
+   +-----------------+--------------------+-------------------------------+
+   | dhcp-ddns:      | Global             | Outcome                       |
+   | enable-updates  | ddns-send-udpates  |                               |
+   +=================+====================+===============================+
+   | false (default) | false              | no updates at any scope       |
+   +-----------------+--------------------+-------------------------------+
+   | false           | true (default)     | no updates at any scope       |
+   +-----------------+--------------------+-------------------------------+
+   | true            | false              | updates only at scopes with   |
+   |                 |                    | a local value of true for     |
+   |                 |                    | ddns-enable-updates           |
+   +-----------------+--------------------+-------------------------------+
+   | true            | true               | updates at all scopes except  |
+   |                 |                    | those with a local value of   |
+   |                 |                    | false for ddns-enable-updates |
+   +-----------------+--------------------+-------------------------------+
 
 .. _dhcpv6-d2-io-config:
 
@@ -2674,7 +2674,7 @@ DHCP-DDNS Server Connectivity
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 For NCRs to reach the D2 server, kea-dhcp6 must be able to communicate
-with it. kea-dhcp4 uses the following configuration parameters to
+with it. kea-dhcp6 uses the following configuration parameters to
 control this communication:
 
 -  ``enable-updates`` - As of Kea 1.7.1, this parameter only enables
index e5dfbedddc0aa3ba81ca5c36d294347c54585f5f..456c6d9d896dcd75aab209a4d52092b2d3ca4c5d 100644 (file)
@@ -1799,8 +1799,9 @@ Dhcpv4Srv::processHostnameOption(Dhcpv4Exchange& ex) {
         // send back a hostname option, send this option with a reserved
         // name for this client.
         if (should_send_hostname) {
-            std::string hostname = d2_mgr.qualifyName(ctx->currentHost()->getHostname(),
-                                                      *(ex.getContext()->getDdnsParams()), false);
+            std::string hostname =
+                d2_mgr.qualifyName(ctx->currentHost()->getHostname(),
+                                   *(ex.getContext()->getDdnsParams()), false);
             // Convert hostname to lower case.
             boost::algorithm::to_lower(hostname);
 
@@ -1823,8 +1824,8 @@ Dhcpv4Srv::processHostnameOption(Dhcpv4Exchange& ex) {
     // hostname option to this client if the client has included hostname option
     // but there is no reservation, or the configuration of the server requires
     // that we send the option regardless.
-    D2ClientConfig::ReplaceClientNameMode replace_name_mode
-        ex.getContext()->getDdnsParams()->replace_client_name_mode_;
+    D2ClientConfig::ReplaceClientNameMode replace_name_mode =
+        ex.getContext()->getDdnsParams()->replace_client_name_mode_;
 
     // If we don't have a hostname then either we'll supply it or do nothing.
     if (!opt_hostname) {
@@ -1898,8 +1899,8 @@ Dhcpv4Srv::processHostnameOption(Dhcpv4Exchange& ex) {
         opt_hostname_resp.reset(new OptionString(Option::V4, DHO_HOST_NAME, "."));
     } else {
         // Sanitize the name the client sent us, if we're configured to do so.
-        isc::util::str::StringSanitizerPtr sanitizer
-            ex.getContext()->getDdnsParams()->getHostnameSanitizer();
+        isc::util::str::StringSanitizerPtr sanitizer =
+            ex.getContext()->getDdnsParams()->getHostnameSanitizer();
 
         if (sanitizer) {
             hostname = sanitizer->scrub(hostname);
@@ -2292,7 +2293,6 @@ Dhcpv4Srv::assignLease(Dhcpv4Exchange& ex) {
         // Set T1 and T2 per configuration.
         setTeeTimes(lease, subnet, resp);
 
-
         // Create NameChangeRequests if DDNS is enabled and this is a
         // real allocation.
         if (!fake_allocation && (ex.getContext()->getDdnsParams()->enable_updates_)) {
index e2d3011c78d9836c9c110a2306d62c0540214f2c..2b1627680664a964ed432290cb68f2177d21537b 100644 (file)
@@ -4289,7 +4289,6 @@ TEST_F(Dhcp4ParserTest, d2ClientConfigValid) {
 
     // The following, deprecated dhcp-ddns parameters,
     // should all have global default values.
-    checkGlobal("ddns-send-updates", true);
     checkGlobal("ddns-override-no-update", false);
     checkGlobal("ddns-override-client-update", false);
     checkGlobal("ddns-replace-client-name", "never");
index 047964ef4427ad10e03f7592dc5b4fd253b35915..1560db92e73dcfbf90d72dd02c0e4cca8afa4899 100644 (file)
@@ -2106,7 +2106,7 @@ TEST_F(NameDhcpv4SrvTest, sanitizeFqdnGlobal) {
     }
 }
 
-// Verifies that socped ddns-parameter handling.
+// Verifies that scoped ddns-parameter handling.
 // Specifically that D2 can be enabled with sending updates
 // disabled globally, and enabled at the subnet level.
 TEST_F(NameDhcpv4SrvTest, ddnsScopeTest) {
@@ -2120,7 +2120,8 @@ TEST_F(NameDhcpv4SrvTest, ddnsScopeTest) {
     // Include the Client FQDN option.
     ASSERT_NO_THROW(client1.includeFQDN((Option4ClientFqdn::FLAG_S
                                         | Option4ClientFqdn::FLAG_E),
-                                       "client1.example.org.", Option4ClientFqdn::FULL));
+                                        "client1.example.org.",
+                                        Option4ClientFqdn::FULL));
 
     // Now send the DHCPREQUEST with including the FQDN option.
     ASSERT_NO_THROW(client1.doDORA());
@@ -2144,7 +2145,8 @@ TEST_F(NameDhcpv4SrvTest, ddnsScopeTest) {
     // Include the Client FQDN option.
     ASSERT_NO_THROW(client2.includeFQDN((Option4ClientFqdn::FLAG_S
                                         | Option4ClientFqdn::FLAG_E),
-                                       "two.example.org.", Option4ClientFqdn::FULL));
+                                        "two.example.org.",
+                                        Option4ClientFqdn::FULL));
 
     ASSERT_NO_THROW(client2.doDORA());
     resp = client2.getContext().response_;
index 17d12797f941a7ef8c2020ddabac2a06654eae6d..fca45ccf9ffb9d2ba6ed6391f7be583886a73647 100644 (file)
@@ -4781,9 +4781,8 @@ TEST_F(Dhcp6ParserTest, classifyPdPools) {
     EXPECT_TRUE (pools.at(3)->clientSupported(classes));
 }
 
-// This test checks the ability of the server to parse a configuration
-// containing a full, valid dhcp-ddns (D2ClientConfig) entry.
-TEST_F(Dhcp6ParserTest, d2ClientConfig) {
+// This test verifies that valid d2CliengConfig works correctly.
+TEST_F(Dhcp6ParserTest, d2ClientConfigValid) {
     // Verify that the D2 configuration can be fetched and is set to disabled.
     D2ClientConfigPtr d2_client_config = CfgMgr::instance().getD2ClientConfig();
     EXPECT_FALSE(d2_client_config->getEnableUpdates());
@@ -4808,15 +4807,6 @@ TEST_F(Dhcp6ParserTest, d2ClientConfig) {
         "     \"max-queue-size\" : 2048, "
         "     \"ncr-protocol\" : \"UDP\", "
         "     \"ncr-format\" : \"JSON\"}, "
-#if 0
-        "     \"override-no-update\" : true, "
-        "     \"override-client-update\" : true, "
-        "     \"replace-client-name\" : \"when-present\", "
-        "     \"generated-prefix\" : \"test.prefix\", "
-        "     \"qualifying-suffix\" : \"test.suffix.\", "
-        "     \"hostname-char-set\" : \"[^A-Za-z0-9_-]\", "
-        "     \"hostname-char-replacement\" : \"x\" }, "
-#endif
         "\"valid-lifetime\": 4000 }";
 
     // Convert the JSON string to configuration elements.
@@ -4853,7 +4843,6 @@ TEST_F(Dhcp6ParserTest, d2ClientConfig) {
 
     // The following, deprecated dhcp-ddns parameters,
     // should all have global default values.
-    checkGlobal("ddns-send-updates", true);
     checkGlobal("ddns-override-no-update", false);
     checkGlobal("ddns-override-client-update", false);
     checkGlobal("ddns-replace-client-name", "never");
index 68875f9f2e797e794019f96ac6add1b2f334fa1c..6a20774da874c22b343701a549b8b41a3b10839f 100644 (file)
@@ -137,9 +137,9 @@ Dhcp6SrvD2Test::configure(const std::string& config, bool exp_result) {
     int rcode;
     ConstElementPtr comment = config::parseAnswer(rcode, status);
     if (exp_result == SHOULD_PASS) {
-        ASSERT_EQ(0, rcode);
+        ASSERT_EQ(0, rcode) << "parse comment: " << comment->stringValue();
     } else {
-        ASSERT_EQ(1, rcode);
+        ASSERT_EQ(1, rcode) << "parse comment: " << comment->stringValue();
     }
 
     if (rcode == 0) {
index eb27678235b67a822bca69f9bc10e7f03be19e9a..b327969b44619659795759e62c212092d0395707 100644 (file)
@@ -17,7 +17,6 @@
 #include <dhcp/option6_status_code.h>
 #include <dhcp/option_int_array.h>
 #include <dhcp/tests/iface_mgr_test_config.h>
-#include <dhcp6/tests/dhcp6_client.h>
 #include <dhcpsrv/lease.h>
 #include <dhcpsrv/lease_mgr_factory.h>
 #include <dhcpsrv/ncr_generator.h>
@@ -1587,7 +1586,7 @@ TEST_F(FqdnDhcpv6SrvTest, sanitizeFqdn) {
              "mxyxhost.example.com.", false);
 }
 
-// Verifies that socped ddns-parameter handling.
+// Verifies that scoped ddns-parameter handling.
 // Specifically that D2 can be enabled with sending updates
 // disabled globally, and enabled at the subnet level.
 TEST_F(FqdnDhcpv6SrvTest, ddnsScopeTest) {
index 95b1d6585236296584cc086ab54e393affffbe57..4f79f5cd95e5137c22ee1514e81b7169148fec73 100644 (file)
@@ -554,7 +554,6 @@ AllocEngine::ClientContext6::getDdnsParams() {
 
     // Asked for it without a subnet? This case really shouldn't occur but
     // for now let's an instance with default values.
-    std::cout << "ClientContext6, Hey we're accessing this without a subnet!" << std::endl;
     return (DdnsParamsPtr(new DdnsParams()));
 }
 
@@ -3083,7 +3082,6 @@ AllocEngine::ClientContext4::getDdnsParams() {
 
     // Asked for it without a subnet? This case really shouldn't occur but
     // for now let's an instance with default values.
-    std::cout << "ClientContext4, Hey we're accessing this without a subnet!" << std::endl;
     return (DdnsParamsPtr(new DdnsParams()));
 }
 
index 3d55fa25ebe73e3f238efb76269b7b64fbb78900..ce5649dd8c7c82d94069bd7a6aaad1eec80ce554 100644 (file)
@@ -9,7 +9,6 @@
 
 #include <asiolink/io_address.h>
 #include <dhcp/classify.h>
-#include <dhcpsrv/d2_client_cfg.h>
 #include <dhcp/duid.h>
 #include <dhcp/hwaddr.h>
 #include <dhcp/pkt4.h>
@@ -17,6 +16,7 @@
 #include <dhcp/option6_ia.h>
 #include <dhcp/option6_iaaddr.h>
 #include <dhcp/option6_iaprefix.h>
+#include <dhcpsrv/d2_client_cfg.h>
 #include <dhcpsrv/host.h>
 #include <dhcpsrv/subnet.h>
 #include <dhcpsrv/lease_mgr.h>
@@ -557,7 +557,7 @@ public:
         /// the selected subnet.
         ///
         /// If there is no selected subnet (i.e. subnet_ is empty), the
-        /// returned set will cotain default values.
+        /// returned set will contain default values.
         ///
         /// @return pointer to a DdnsParams instance
         DdnsParamsPtr getDdnsParams();
@@ -1339,7 +1339,7 @@ public:
         /// the selected subnet.
         ///
         /// If there is no selected subnet (i.e. subnet_ is empty), the
-        /// returned set will cotain default values.
+        /// returned set will contain default values.
         ///
         /// @return pointer to a DdnsParams instance
         DdnsParamsPtr getDdnsParams();
index 4b67409df489ab932592d807e8c4d5a373e5739f..c131e5d7b60512d0987c2a301c6921f68dd8913f 100644 (file)
@@ -242,7 +242,7 @@ struct DdnsParams {
     DdnsParams() :
         enable_updates_(false), override_no_update_(false), override_client_update_(false),
         replace_client_name_mode_(D2ClientConfig::RCM_NEVER),
-        generated_prefix_(""), qualifying_suffix_(""), hostname_char_set_(""),
+        generated_prefix_("myhost"), qualifying_suffix_(""), hostname_char_set_(""),
         hostname_char_replacement_("") {};
 
     /// @brief Indicates whether or not DHCP DDNS updating is enabled.
index ef96b3df6ad41e24a2bb30a3337e6224db7ca9f6..aac2a5de1f1c5ad01de81de41baf4d8c79837937 100644 (file)
@@ -19,6 +19,7 @@ namespace dhcp {
 const Triplet<uint32_t>
 BaseNetworkParser::parseLifetime(const ConstElementPtr& scope,
                                  const std::string& name) {
+    // Initialize as some compilers complain otherwise.
     uint32_t value = 0;
     bool has_value = false;
     uint32_t min_value = 0;
@@ -212,7 +213,7 @@ BaseNetworkParser::parseDdnsParams(const data::ConstElementPtr& network_data,
     }
 
     // We need to validate santizer values here so we can detect problems and
-    // cause a configuration.  We dont' retain the compilation because it's not
+    // cause a configuration.  We don't retain the compilation because it's not
     // something we can inherit.
     if (!hostname_char_set.empty()) {
         try {
index 629a59307cd28aef67a0c9520ea810049f906108..5e63faa2b0870d47f42ae68eac36e351fed9a481 100644 (file)
@@ -405,7 +405,7 @@ public:
         return (hooks_config_);
     }
 
-    /// @brief Fetches the DDNS parameters for the given subnet
+    /// @brief Fetches the DDNS parameters for a given subnet.
     ///
     /// Creates a DdnsParams structure populated with the scoped
     /// values for DDNS behaviorial parameters. The scope mode used