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
},
// 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.
},
// 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.
(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
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:
.. 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:
(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``
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:
.. 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:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
// 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);
// 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) {
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);
// 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_)) {
// 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");
}
}
-// 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) {
// 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());
// 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_;
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());
" \"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.
// 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");
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) {
#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>
"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) {
// 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()));
}
// 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()));
}
#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>
#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>
/// 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();
/// 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();
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.
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;
}
// 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 {
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