"socket-type": "https",
// Address of the HTTPS socket the Kea DHCP-DDNS server should
- // listen for incoming queries. In fact an alias of
- // socket-name.
+ // listen for incoming queries.
"socket-address": "127.0.0.1",
// Port of the HTTPS socket the Kea DHCP-DDNS server
"socket-type": "https",
// Address of the HTTPS socket the Kea DHCPv4 server should
- // listen for incoming queries. In fact an alias of
- // socket-name.
+ // listen for incoming queries.
"socket-address": "127.0.0.1",
// Port of the HTTPS socket the Kea DHCPv4 server
"socket-type": "https",
// Address of the HTTPS socket the Kea DHCPv6 server should
- // listen for incoming queries. In fact an alias of
- // socket-name.
+ // listen for incoming queries.
"socket-address": "::1",
// Port of the HTTPS socket the Kea DHCPv6 server
control_socket_name: SOCKET_NAME {
ctx.unique("socket-name", ctx.loc2pos(@1));
+ ctx.unique("socket-address", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr name(new StringElement($4, ctx.loc2pos(@4)));
control_socket_address: SOCKET_ADDRESS {
ctx.unique("socket-address", ctx.loc2pos(@1));
+ ctx.unique("socket-name", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr address(new StringElement($4, ctx.loc2pos(@4)));
control_socket_name: SOCKET_NAME {
ctx.unique("socket-name", ctx.loc2pos(@1));
+ ctx.unique("socket-address", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr name(new StringElement($4, ctx.loc2pos(@4)));
control_socket_address: SOCKET_ADDRESS {
ctx.unique("socket-address", ctx.loc2pos(@1));
+ ctx.unique("socket-name", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr address(new StringElement($4, ctx.loc2pos(@4)));
control_socket_name: SOCKET_NAME {
ctx.unique("socket-name", ctx.loc2pos(@1));
+ ctx.unique("socket-address", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr name(new StringElement($4, ctx.loc2pos(@4)));
control_socket_address: SOCKET_ADDRESS {
ctx.unique("socket-address", ctx.loc2pos(@1));
+ ctx.unique("socket-name", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr address(new StringElement($4, ctx.loc2pos(@4)));
<< socket_type_ << "' not 'http' or 'https'");
}
}
-
+ // Reject UNIX only socket-name.
+ if (config->contains("socket-name")) {
+ isc_throw(DhcpConfigError,
+ "parameter 'socket-name' is not supported by HTTP "
+ "control sockets");
+ }
// Get socket address.
- ConstElementPtr socket_name = config->get("socket-name");
ConstElementPtr socket_address = config->get("socket-address");
- if (socket_name) {
- // socket-name is an alias of socket-address.
- if (socket_address) {
- isc_throw(DhcpConfigError,
- "specify both 'socket-name' and 'socket-address' "
- "is forbidden");
- }
- socket_address = socket_name;
- }
if (socket_address) {
if (socket_address->getType() != Element::string) {
isc_throw(DhcpConfigError,
- "invalid type specified for parameter 'socket-"
- << (socket_name ? "name" : "address") << "' ("
+ "invalid type specified for parameter 'socket-address' ("
<< socket_address->getPosition() << ")");
}
try {
(config->getCertRequired() != current_config_->getCertRequired())) {
LOG_WARN(command_logger, HTTP_COMMAND_MGR_IGNORED_TLS_SETUP_CHANGES);
// Overwrite the authentication setup and the emulation flag
- //in the response creator config.
+ // in the response creator config.
current_config_->setAuthConfig(config->getAuthConfig());
current_config_->setEmulateAgentResponse(config->getEmulateAgentResponse());
} else {
"unsupported 'socket-type' 'unix' not 'http' or 'https'"
},
{
- "both socket-name and socket-address",
- R"( { "socket-name": "::1", "socket-address": "::1" } )",
- "specify both 'socket-name' and 'socket-address' "
- "is forbidden"
- },
- {
- "bad socket-name type",
- R"( { "socket-name": 8000 } )",
- "invalid type specified for parameter 'socket-name' "
- "(<string>:1:19)"
+ "unsupported socket-name",
+ R"( { "socket-name": "::1" } )",
+ "parameter 'socket-name' is not supported by HTTP control sockets"
},
{
"bad socket-address type",