Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow array references on the LHS of attr/attr maps.
Made radius_map2request() no longer use radius_pairmove() which makes this code more complicated, but should make the server slightly faster. Adding array references to radius_pairmove() is just a non-starter.
- Loading branch information
Showing
2 changed files
with
185 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# | ||
# PRE: update | ||
# | ||
update request { | ||
NAS-Port := 1000 | ||
} | ||
|
||
# | ||
# Filtering | ||
# | ||
update request { | ||
NAS-Port == 1000 | ||
} | ||
|
||
if (NAS-Port != 1000) { | ||
update reply { | ||
Filter-Id := "fail 1" | ||
} | ||
} | ||
|
||
update request { | ||
NAS-Port <= 500 | ||
} | ||
|
||
if (NAS-Port != 500) { | ||
update reply { | ||
Filter-Id := "fail 2" | ||
} | ||
} | ||
|
||
update request { | ||
NAS-Port >= 2000 | ||
} | ||
|
||
if (NAS-Port != 2000) { | ||
update reply { | ||
Filter-Id := "fail 3" | ||
} | ||
} | ||
|
||
if (!reply:Filter-Id) { | ||
update control { | ||
Cleartext-Password := 'hello' | ||
} | ||
|
||
update reply { | ||
Filter-Id := "filter" | ||
} | ||
} |