Skip to content

Commit

Permalink
Update radius dictionary to add Juniper-AV-Pair to dictionary
Browse files Browse the repository at this point in the history
Fixes #6100
  • Loading branch information
jrouzierinverse committed Jan 20, 2021
1 parent 9199b88 commit dd64044
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
3 changes: 3 additions & 0 deletions lib/pf/util/radius_dictionary.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4365,6 +4365,7 @@ our $RADIUS_DICTIONARY = bless(
"IWF-Session" => "ADSL-Forum",
"Juniper-Allow-Commands" => "Juniper",
"Juniper-Allow-Configuration" => "Juniper",
"Juniper-AV-Pair" => "Juniper",
"Juniper-cell-overhead" => "Juniper",
"Juniper-Configuration-Change" => "Juniper",
"Juniper-CoS-Parameter" => "Juniper",
Expand Down Expand Up @@ -11130,6 +11131,7 @@ our $RADIUS_DICTIONARY = bless(
47 => [ "Juniper-Local-Interface", "string" ],
48 => [ "Juniper-Switching-Filter", "string" ],
49 => [ "Juniper-VoIP-Vlan", "string" ],
52 => [ "Juniper-AV-Pair", "string" ],
},
2637 => {
1 => [ "CVX-Identification", "string" ],
Expand Down Expand Up @@ -26111,6 +26113,7 @@ our $RADIUS_DICTIONARY = bless(
2636 => {
"Juniper-Allow-Commands" => [ 2, "string" ],
"Juniper-Allow-Configuration" => [ 4, "string" ],
"Juniper-AV-Pair" => [ 52, "string" ],
"Juniper-cell-overhead" => [ 41, "integer" ],
"Juniper-Configuration-Change" => [ 9, "string" ],
"Juniper-CoS-Parameter" => [ 39, "string" ],
Expand Down
10 changes: 10 additions & 0 deletions raddb/dictionary.inverse
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,13 @@ ATTRIBUTE PacketFence-reply-insert 38 string

END-VENDOR Inverse

VENDOR Juniper 2636

BEGIN-VENDOR Juniper
#
# Standard attribute
#

ATTRIBUTE Juniper-AV-Pair 52 string

END-VENDOR Juniper
10 changes: 4 additions & 6 deletions t/stress-test/coa-server.pl
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ =head1 DESCRIPTION
use Net::Radius::Dictionary;
use Net::Radius::Packet;
use Net::UDP;
use lib qw(/usr/local/pf/lib);
use pf::util::radius_dictionary ($RADIUS_DICTIONARY);

my $secret = "qwerty"; # Shared secret on the term server. This seems to be ignored actually.

# Parse the RADIUS dictionary file (must have dictionary in current dir)
my $dict = new Net::Radius::Dictionary "/usr/local/pf/lib/pf/util/dictionary"
or die "Couldn't read dictionary: $!";

# Set up the network socket (must have radius-dynauth in /etc/services)
my $s = new Net::UDP { thisservice => "radius-dynauth" } or die $!;
$s->bind or die "Couldn't bind: $!";
Expand All @@ -44,9 +42,9 @@ =head1 DESCRIPTION
# Get the data
$rec = $s->recv(undef, undef, $whence);
# Unpack it
my $p = new Net::Radius::Packet $dict, $rec;
my $p = new Net::Radius::Packet $RADIUS_DICTIONARY, $rec;
# Create a response packet
my $rp = new Net::Radius::Packet $dict;
my $rp = new Net::Radius::Packet $RADIUS_DICTIONARY;

if ( my ($request_type) = $p->code =~ /(CoA|Disconnect)-Request/ ) {

Expand Down

0 comments on commit dd64044

Please sign in to comment.