+2462. [func] razvan
+ Added 'interface-add', 'interface-list' and 'interface-redetect'
+ which can be used to add interfaces, list currently detected
+ interfaces and issue a re-detect procedure which updates the
+ interface configuration respectively. The re-detect procedure
+ only adds newly discovered interfaces, without removing any
+ previously detected interfaces.
+ (Gitlab #3144)
+
Kea 3.1.8 (development) released on April 29, 2026
2461. [bug] fdupont
----------------------------------
The :isccmd:`interface-redetect` command retrieves the list of detected interfaces
-after performing a re-detect procedure.
+after performing a re-detect procedure which only adds newly discovered interfaces,
+without removing any previously detected interfaces.
This command does not take any parameters."
.. isccmd:: interface-add
...
}
+The re-detect mechanism usually removes previously detected interfaces and
+then adds all currently detected interfaces.
Note that interfaces are not re-detected when the :isccmd:`config-test`
or :isccmd:`config-set` commands are run.
However, new interfaces are detected and are available for use by
...
}
+The re-detect mechanism usually removes previously detected interfaces and
+then adds all currently detected interfaces.
Note that interfaces are not re-detected when the :isccmd:`config-test`
or :isccmd:`config-set` commands are run.
However, new interfaces are detected and are available for use by
return (isc::config::createAnswer(CONTROL_RESULT_ERROR, message));
}
if (!ifaces_config->size()) {
- return (isc::config::createAnswer(CONTROL_RESULT_SUCCESS, "Configuration successful."));
+ return (isc::config::createAnswer(CONTROL_RESULT_SUCCESS, "Interface configuration successfully updated."));
}
bool error = false;
try {
ostringstream msg;
if (!error) {
- return (isc::config::createAnswer(CONTROL_RESULT_SUCCESS, "Configuration successful."));
+ return (isc::config::createAnswer(CONTROL_RESULT_SUCCESS, "Interface configuration successfully updated."));
} else {
- msg << "Unexpected error while updating used interfaces: " << message;
+ msg << "Updating used interfaces failed: " << message;
return (isc::config::createAnswer(CONTROL_RESULT_ERROR, msg.str()));
}
}
std::string command = "{ \"command\": \"interface-add\", \"arguments\": { \"interfaces\": [ \"eth0\" ] } }";
sendUnixCommand(command, response);
- EXPECT_EQ(response, "{ \"result\": 0, \"text\": \"Configuration successful.\" }");
+ EXPECT_EQ(response, "{ \"result\": 0, \"text\": \"Interface configuration successfully updated.\" }");
command = "{ \"command\": \"interface-list\" }";
sendUnixCommand(command, response);
std::string command = "{ \"command\": \"interface-add\", \"arguments\": { \"interfaces\": [ \"eth0\" ] } }";
sendHttpCommand(command, response);
- EXPECT_EQ(response, "[ { \"result\": 0, \"text\": \"Configuration successful.\" } ]");
+ EXPECT_EQ(response, "[ { \"result\": 0, \"text\": \"Interface configuration successfully updated.\" } ]");
command = "{ \"command\": \"interface-list\" }";
sendHttpCommand(command, response);
return (isc::config::createAnswer(CONTROL_RESULT_ERROR, message));
}
if (!ifaces_config->size()) {
- return (isc::config::createAnswer(CONTROL_RESULT_SUCCESS, "Configuration successful."));
+ return (isc::config::createAnswer(CONTROL_RESULT_SUCCESS, "Interface configuration successfully updated."));
}
bool error = false;
try {
ostringstream msg;
if (!error) {
- return (isc::config::createAnswer(CONTROL_RESULT_SUCCESS, "Configuration successful."));
+ return (isc::config::createAnswer(CONTROL_RESULT_SUCCESS, "Interface configuration successfully updated."));
} else {
- msg << "Unexpected error while updating used interfaces: " << message;
+ msg << "Updating used interfaces failed: " << message;
return (isc::config::createAnswer(CONTROL_RESULT_ERROR, msg.str()));
}
}
std::string command = "{ \"command\": \"interface-add\", \"arguments\": { \"interfaces\": [ \"eth0\" ] } }";
sendUnixCommand(command, response);
- EXPECT_EQ(response, "{ \"result\": 0, \"text\": \"Configuration successful.\" }");
+ EXPECT_EQ(response, "{ \"result\": 0, \"text\": \"Interface configuration successfully updated.\" }");
command = "{ \"command\": \"interface-list\" }";
sendUnixCommand(command, response);
std::string command = "{ \"command\": \"interface-add\", \"arguments\": { \"interfaces\": [ \"eth0\" ] } }";
sendHttpCommand(command, response);
- EXPECT_EQ(response, "[ { \"result\": 0, \"text\": \"Configuration successful.\" } ]");
+ EXPECT_EQ(response, "[ { \"result\": 0, \"text\": \"Interface configuration successfully updated.\" } ]");
command = "{ \"command\": \"interface-list\" }";
sendHttpCommand(command, response);
"avail": "3.1.9",
"brief": [
"This command retrieves the list of detected interfaces after performing",
- "a re-detect procedure.",
+ "a re-detect procedure which only adds newly discovered interfaces,",
+ "without removing any previously detected interfaces.",
"This command does not take any parameters."
],
"cmd-syntax": [