Skip to content

Conversation

@HelenMamontova
Copy link
Contributor

Class RAD_SETTINGS is transferred to separate files .h / .cpp. The makeResponse function changed to send attributes configured in the /send section. Function makeAttributes added.

declaration changed. Class members m_thread, m_mutex added. Function Run
declaration added.
find_package(OpenSSL 1.0.0 Required) added, OpenSSL::Crypto added to
target_link_libraries command in the block if(BUILD_MOD_RADIUS).
definition changed. Method Stop: variable isRunning=false removed,
m_thread.joinable check added, isRunning check added, request_stop call added.
Method Run: parameter token added, variables secret, port removed,
object lock and isRunning=true added before cycle while,
cycle while added, isRunning=false added after cycle while.
for m_thread.join() removed in the Stop function.
added to constructor RADIUS. Output cerr replaced by logger and
printfd().
…nged to attributes and & added to parameter in the ShowRules function.
function declaration added. Class member m_auth, m_autz added.
Unnecessary code removed.
definition and call added, MakeKeyValuePairs function removed,
ParseSettings function changed. Extra printfd function added.
declaration removed, struct Settings forward declaration removed.
    <algorithm>, <ioservice> removed. Extra using declaration removed.
    Functions definition of class RAD_SETTINGS removed. Parameter
    m_radSettings added to Server constructor call.
…ed to

constructor Server declaration. Class memberm_radSettings added.
… Class member m_radSettings initialization added in the constructor Server.
changed to const in constructor Server declaration. The bool findUser function
declaration replaced by const User* findUser.
…arameter radSettings

changed to const in constructor Server definition. The bool findUser function definition
replaced by const User* findUser. The makeAttributes function definition
added. Function makeResponse definition changed.

<auth>
send = "Framed-IP-Address = currip, Service-Type = \'Framed-User\'"
send = "User-Name = login, Framed-IP-Address = currip, Service-Type = \'Framed-User\', Callback-Number = \'987654abc\'"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the original value. It makes more sense.

add_library ( mod_radius MODULE other/radius/radius.cpp
other/radius/server.cpp)
other/radius/server.cpp
other/radius/rad_settings.cpp)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just settings.cpp?

: m_radius(io_context, secret, port),
m_dictionaries(filePath),
m_users(users),
m_radSettings(radSettings),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's call them settings and m_settings.

}

RadProto::Packet Server::makeResponse(const RadProto::Packet& request)
std::vector<RadProto::Attribute*> Server::makeAttributes(const User* user)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this code is derived from the async-radius library, isn't it? If so, let's just expose it in the lib and use here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants