Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
smradius
smradius
Commits
1d36c549
Commit
1d36c549
authored
May 17, 2019
by
Nigel Kukard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change Server to NAS
parent
7d13c6c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/smradius/daemon.pm
lib/smradius/daemon.pm
+2
-2
No files found.
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
Markdown
is supported
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