|
@@ -24,6 +24,8 @@
|
|
|
#include <boost/pointer_cast.hpp>
|
|
|
#include <boost/static_assert.hpp>
|
|
|
|
|
|
+#include <radcli/radcli.h>
|
|
|
+
|
|
|
#include <stdint.h>
|
|
|
#include <string>
|
|
|
|
|
@@ -75,7 +77,18 @@ namespace dhcp {
|
|
|
|
|
|
RadiusHostDataSource::
|
|
|
RadiusHostDataSource(const DatabaseConnection::ParameterMap& parameters) {
|
|
|
- // TODO: radius session inilialisation
|
|
|
+ int res;
|
|
|
+ rh = rc_new();
|
|
|
+ if (rh == NULL) {
|
|
|
+ isc_throw(isc::Exception, "Failed to initialize Radius client");
|
|
|
+ }
|
|
|
+ res = rc_add_config(rh, "authserver", "127.0.0.1", NULL, 0);
|
|
|
+ if (res != 0) {
|
|
|
+ isc_throw(isc::Exception, "Failed to initialize Radius client");
|
|
|
+ }
|
|
|
+ res = rc_add_config(rh, "radius_timeout", "1", NULL, 0);
|
|
|
+ res = rc_add_config(rh, "radius_retries", "2", NULL, 0);
|
|
|
+ res = rc_add_config(rh, "serv-type", "tcp", NULL, 0);
|
|
|
}
|
|
|
|
|
|
RadiusHostDataSource::~RadiusHostDataSource() {
|