Skip to content

Commit

Permalink
https://telecominfraproject.atlassian.net/browse/WIFI-12868
Browse files Browse the repository at this point in the history
Signed-off-by: stephb9959 <[email protected]>
  • Loading branch information
stephb9959 committed Aug 31, 2023
1 parent 63d2bcd commit 746458d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/RADIUSSessionTracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ namespace OpenWifi {
}
}

std::cout << "AUTH -> " << Notification.SerialNumber_ << ": AccountingSessionId: " << AccountingSessionId << " AccountingMultiSessionId: " << AccountingMultiSessionId << std::endl;

auto ap_hint = AccountingSessions_.find(Notification.SerialNumber_);
if(ap_hint==end(AccountingSessions_)) {
SessionMap M;
Expand Down Expand Up @@ -180,13 +178,14 @@ namespace OpenWifi {
session_hint->second->lastTransaction = Utils::Now();
}

/*
if(ap_hint!=AccountingSessions_.end()) {
std::cout << "Auth table:" << std::endl;
for(const auto &session:ap_hint->second) {
std::cout << Notification.SerialNumber_ << ": Index: " << session.first << ": ID: " << session.second->accountingSessionId << " MID:" << session.second->accountingMultiSessionId << std::endl;
}
}

*/
}

std::uint32_t GetUiInt32(const std::uint8_t *buf) {
Expand Down Expand Up @@ -295,7 +294,7 @@ namespace OpenWifi {
return;
}

std::cout << "ACT -> " << Notification.SerialNumber_ << ": AccountingSessionId: " << AccountingSessionId << " AccountingMultiSessionId: " << AccountingMultiSessionId << std::endl;
// std::cout << "ACT -> " << Notification.SerialNumber_ << ": AccountingSessionId: " << AccountingSessionId << " AccountingMultiSessionId: " << AccountingMultiSessionId << std::endl;

auto NewSession = std::make_shared<GWObjects::RADIUSSession>();
NewSession->serialNumber = Notification.SerialNumber_;
Expand Down Expand Up @@ -343,12 +342,13 @@ namespace OpenWifi {
}
}

if(ap_hint!=AccountingSessions_.end()) {
/* if(ap_hint!=AccountingSessions_.end()) {
std::cout << "Acct table:" << std::endl;
for(const auto &session:ap_hint->second) {
std::cout << Notification.SerialNumber_ << ": Index: " << session.first << ": ID: " << session.second->accountingSessionId << " MID:" << session.second->accountingMultiSessionId << std::endl;
}
}
*/
}

[[maybe_unused]] static void store_packet(const std::string &serialNumber, const char *buffer, std::size_t size, int i) {
Expand Down Expand Up @@ -381,7 +381,7 @@ namespace OpenWifi {
if(!session->accountingMultiSessionId.empty())
P.AppendAttribute(RADIUS::Attributes::ACCT_MULTI_SESSION_ID, session->accountingMultiSessionId);
auto ProxyState = session->serialNumber + ":" + "0.0.0.0" + ":" + "3799" + ":" + session->interface;
std::cout << "Proxy state: " << ProxyState << " Secret: " << session->secret << std::endl;
// std::cout << "Proxy state: " << ProxyState << " Secret: " << session->secret << std::endl;
P.AppendAttribute(RADIUS::Attributes::PROXY_STATE, ProxyState);
P.RecomputeAuthenticator(session->secret);
P.Log(std::cout);
Expand Down

0 comments on commit 746458d

Please sign in to comment.