Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
smradius
smradius
Commits
1d36c549
Commit
1d36c549
authored
May 17, 2019
by
Nigel Kukard
Browse files
Change Server to NAS
parent
7d13c6c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/smradius/daemon.pm
View file @
1d36c549
...
...
@@ -622,7 +622,7 @@ sub process_request {
my
$timePeriod
=
$now
-
$val
;
# Check if we're still within the abuse threshold
if
(
$pkt
->
code
eq
"
Access-Request
"
&&
$timePeriod
<
$self
->
{'
smradius
'}
->
{'
access_request_abuse_threshold
'})
{
$self
->
log
(
LOG_NOTICE
,"
[SMRADIUS] ABUSE:
Server
trying too fast.
server
=
"
.
$server
->
{'
peeraddr
'}
.
"
, user =
"
.
$user
->
{'
Username
'}
.
$self
->
log
(
LOG_NOTICE
,"
[SMRADIUS] ABUSE:
NAS
trying too fast.
NAS
=
"
.
$server
->
{'
peeraddr
'}
.
"
, user =
"
.
$user
->
{'
Username
'}
.
"
, code =
"
.
$pkt
->
code
.
"
, timeout =
"
.
(
$now
-
$val
));
# Tell the NAS we got its packet
my
$resp
=
smradius::Radius::
Packet
->
new
(
$self
->
{'
radius
'}
->
{'
dictionary
'});
...
...
@@ -635,7 +635,7 @@ sub process_request {
return
;
}
elsif
(
$pkt
->
code
eq
"
Accounting-Request
"
&&
$timePeriod
<
$self
->
{'
smradius
'}
->
{'
accounting_request_abuse_threshold
'})
{
$self
->
log
(
LOG_NOTICE
,"
[SMRADIUS] ABUSE:
Server
trying too fast.
server
=
"
.
$server
->
{'
peeraddr
'}
.
"
, user =
"
.
$user
->
{'
Username
'}
.
$self
->
log
(
LOG_NOTICE
,"
[SMRADIUS] ABUSE:
NAS
trying too fast.
NAS
=
"
.
$server
->
{'
peeraddr
'}
.
"
, user =
"
.
$user
->
{'
Username
'}
.
"
, code =
"
.
$pkt
->
code
.
"
, timeout =
"
.
(
$now
-
$val
));
# Tell the NAS we got its packet
my
$resp
=
smradius::Radius::
Packet
->
new
(
$self
->
{'
radius
'}
->
{'
dictionary
'});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment