From: Maxim Mamontov Date: Wed, 14 Feb 2018 10:34:27 +0000 (+0200) Subject: Merge branch 'stg-2.409' into stg-2.409-radius X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/251889d0a0ea5fcb32fe9d99a885848d962d89fe?hp=22cb2560274e05e6490cf964cbbeb74a1991c642 Merge branch 'stg-2.409' into stg-2.409-radius --- diff --git a/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp b/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp index de30e7d2..3aec35ae 100644 --- a/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp +++ b/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp @@ -1203,7 +1203,7 @@ if ((iaUser->phase.GetPhase() == 2) && (connAck->rnd == iaUser->rnd + 1)) return -1; } } -printfd(__FILE__, "Invalid phase or control number. Phase: %d. Control number: %d\n", iaUser->phase.GetPhase(), connAck->rnd); +printfd(__FILE__, "Invalid phase or control number. Phase: %d. Control number: %d, expected: %d\n", iaUser->phase.GetPhase(), connAck->rnd, iaUser->rnd + 1); if (iaSettings.LogProtocolErrors()) { if (iaUser->phase.GetPhase() != 2) @@ -1248,7 +1248,7 @@ if ((iaUser->phase.GetPhase() == 2) && (connAck->rnd == iaUser->rnd + 1)) return -1; } } -printfd(__FILE__, "Invalid phase or control number. Phase: %d. Control number: %d\n", iaUser->phase.GetPhase(), connAck->rnd); +printfd(__FILE__, "Invalid phase or control number. Phase: %d. Control number: %d, expected: %d\n", iaUser->phase.GetPhase(), connAck->rnd, iaUser->rnd + 1); if (iaSettings.LogProtocolErrors()) { if (iaUser->phase.GetPhase() != 2) @@ -1411,6 +1411,8 @@ for (int j = 0; j < DIR_NUM; j++) iaUser->rnd = static_cast(random()); connSynAck6.rnd = iaUser->rnd; +printfd(__FILE__, "Sending CONN_SYN_ACK with control number %d.\n", iaUser->rnd); + connSynAck6.userTimeOut = iaSettings.GetUserTimeout().GetSec(); connSynAck6.aliveDelay = iaSettings.GetUserDelay().GetSec(); @@ -1453,6 +1455,8 @@ for (int j = 0; j < DIR_NUM; j++) iaUser->rnd = static_cast(random()); connSynAck8.rnd = iaUser->rnd; +printfd(__FILE__, "Sending CONN_SYN_ACK with control number %d.\n", iaUser->rnd); + connSynAck8.userTimeOut = iaSettings.GetUserTimeout().GetSec(); connSynAck8.aliveDelay = iaSettings.GetUserDelay().GetSec(); diff --git a/projects/stargazer/plugins/other/rscript/send_functor.h b/projects/stargazer/plugins/other/rscript/send_functor.h index baa4c118..dc8ad63a 100644 --- a/projects/stargazer/plugins/other/rscript/send_functor.h +++ b/projects/stargazer/plugins/other/rscript/send_functor.h @@ -33,6 +33,7 @@ #include #include +#include #include class PacketSender : public std::unary_function { diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index d6c749b7..d530108b 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -222,6 +222,7 @@ void USER_IMPL::Init() { password = "*_EMPTY_PASSWORD_*"; tariffName = NO_TARIFF_NAME; +tariff = tariffs->FindByName(tariffName); ips = StrToIPS("*"); lastWriteStat = stgTime + random() % settings->GetStatWritePeriod(); lastWriteDetailedStat = stgTime;