Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
opentrafficshaper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Francisco Manuel Cardoso
opentrafficshaper
Commits
18dd8ba1
Commit
18dd8ba1
authored
11 years ago
by
Nigel Kukard
Browse files
Options
Downloads
Patches
Plain Diff
Pull radius plugin config direct from config hash
parent
0f12afef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
opentrafficshaper/plugins/radius/radius.pm
+17
-4
17 additions, 4 deletions
opentrafficshaper/plugins/radius/radius.pm
with
17 additions
and
4 deletions
opentrafficshaper/plugins/radius/radius.pm
+
17
−
4
View file @
18dd8ba1
...
@@ -80,17 +80,30 @@ sub init
...
@@ -80,17 +80,30 @@ sub init
$logger
->
log
(
LOG_NOTICE
,"
[RADIUS] OpenTrafficShaper Radius Module v
"
.
VERSION
.
"
- Copyright (c) 2013, AllWorldIT
");
$logger
->
log
(
LOG_NOTICE
,"
[RADIUS] OpenTrafficShaper Radius Module v
"
.
VERSION
.
"
- Copyright (c) 2013, AllWorldIT
");
#
# Dictionary configuration
#
# Split off dictionaries to load
if
(
ref
(
$globals
->
{'
file.config
'}
->
{'
plugin.radius
'}
->
{'
dictionary
'})
eq
"
ARRAY
")
{
foreach
my
$dict
(
@
{
$globals
->
{'
file.config
'}
->
{'
plugin.radius
'}
->
{'
dictionary
'}})
{
$dict
=~
s/\s+//g
;
# Skip comments
next
if
(
$dict
=~
/^#/
);
push
(
@
{
$globals
->
{'
plugin.radius
'}
->
{'
config
'}
->
{'
dictionaries
'}},
$dict
);
}
}
# Load dictionaries
# Load dictionaries
$logger
->
log
(
LOG_
INFO
,"
[RADIUS] Loading dictionaries...
");
$logger
->
log
(
LOG_
DEBUG
,"
[RADIUS] Loading dictionaries...
");
my
$dict
=
new
opentrafficshaper::plugins::radius::Radius::
Dictionary
;
my
$dict
=
new
opentrafficshaper::plugins::radius::Radius::
Dictionary
;
foreach
my
$df
(
@
{
$globals
->
{'
config
'}
->
{'
dictionar
y_list
'}})
{
foreach
my
$df
(
@
{
$globals
->
{'
plugin.radius
'}
->
{'
config
'}
->
{'
dictionar
ies
'}})
{
# Load dictionary
# Load dictionary
if
(
!
$dict
->
readfile
(
$df
))
{
if
(
!
$dict
->
readfile
(
$df
))
{
$logger
->
log
(
LOG_WARN
,"
[RADIUS] Failed to load dictionary '
$df
': $!
");
$logger
->
log
(
LOG_WARN
,"
[RADIUS] Failed to load dictionary '
$df
': $!
");
}
}
$logger
->
log
(
LOG_
DEBUG
,"
[RADIUS] Loaded dictionary '
$df
'.
");
$logger
->
log
(
LOG_
INFO
,"
[RADIUS] Loaded dictionary '
$df
'.
");
}
}
$logger
->
log
(
LOG_
INFO
,"
[RADIUS] Loading dictionaries completed.
");
$logger
->
log
(
LOG_
DEBUG
,"
[RADIUS] Loading dictionaries completed.
");
# Store the dictionary
# Store the dictionary
$globals
->
{'
plugin.radius
'}
->
{'
dictionary
'}
=
$dict
;
$globals
->
{'
plugin.radius
'}
->
{'
dictionary
'}
=
$dict
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment