|
@@ -112,6 +112,13 @@ RadiusHostDataSource(const DatabaseConnection::ParameterMap& parameters) {
|
|
|
isc_throw(DbOpenError, "Failed to configure Radius retries");
|
|
|
}
|
|
|
|
|
|
+ try {
|
|
|
+ realm_ = getParameter(parameters, "name");
|
|
|
+ } catch (...) {
|
|
|
+ // No realm. Throw an exception.
|
|
|
+ isc_throw(NoDatabaseName, "must specify a database name (realm) for Radius connection");
|
|
|
+ }
|
|
|
+
|
|
|
const char* host = "localhost";
|
|
|
string shost;
|
|
|
try {
|
|
@@ -248,7 +255,7 @@ RadiusHostDataSource::getAll(const Host::IdentifierType& identifier_type,
|
|
|
delim = true;
|
|
|
}
|
|
|
// Add realm
|
|
|
- tmp << "@radio.rezine.org";
|
|
|
+ tmp << "@" << realm_;
|
|
|
// Necessary because of variable lifetime, see https://stackoverflow.com/a/1374485/4113356
|
|
|
const std::string tmp2 = tmp.str();
|
|
|
const char* identifier_hex = tmp2.c_str();
|