Skip to content
Snippets Groups Projects
Commit 15164408 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Added IANA public enterprise number

parent 8da92bd5
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@
VENDOR AllWorldIT 11111
VENDOR AllWorldIT 42109
ATTRIBUTE OpenTrafficShaper-Traffic-Limit 1 string AllWorldIT
ATTRIBUTE OpenTrafficShaper-Traffic-Group 2 integer AllWorldIT
......
......@@ -45,6 +45,9 @@ use constant {
VERSION => '0.0.1',
DATAGRAM_MAXLEN => 8192,
DEFAULT_EXPIRY_PERIOD => 86400,
# IANA public enterprise number
# This is used as the radius vendor code
IANA_PEN => 42109,
};
......@@ -207,15 +210,15 @@ sub server_read {
# Pull in a variables from packet
my $username = $pkt->rawattr("User-Name");
my $trafficGroup;
if (my $attrRawVal = $pkt->vsattr(11111,'OpenTrafficShaper-Traffic-Group')) {
if (my $attrRawVal = $pkt->vsattr(IANA_PEN,'OpenTrafficShaper-Traffic-Group')) {
$trafficGroup = @{ $attrRawVal }[0];
}
my $trafficClass;
if (my $attrRawVal = $pkt->vsattr(11111,'OpenTrafficShaper-Traffic-Class')) {
if (my $attrRawVal = $pkt->vsattr(IANA_PEN,'OpenTrafficShaper-Traffic-Class')) {
$trafficClass = @{ $attrRawVal }[0];
}
my $trafficLimit;
if (my $attrRawVal = $pkt->vsattr(11111,'OpenTrafficShaper-Traffic-Limit')) {
if (my $attrRawVal = $pkt->vsattr(IANA_PEN,'OpenTrafficShaper-Traffic-Limit')) {
$trafficLimit = @{ $attrRawVal }[0];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment