Skip to content

Commit

Permalink
Adapt the code for the new freeradius version
Browse files Browse the repository at this point in the history
  • Loading branch information
fdurand committed Dec 29, 2024
1 parent ae5befc commit 72b9ed9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/pf/Switch/Ruckus/SmartZone.pm
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ sub generate_dpsk_attribute_value {
return "0x00".$hash;
}


sub find_user_by_psk {
my ($self, $radius_request, $args) = @_;
my $pid;
Expand All @@ -335,11 +334,11 @@ sub find_user_by_psk {
}

my $ssid = $radius_request->{'Ruckus-Wlan-Name'};
my $bssid = pack("H*", pf::util::wpa::strip_hex_prefix($radius_request->{"Ruckus-BSSID"}));
my $bssid = pack("H*", sprintf("%v02x", $radius_request->{"Ruckus-BSSID"}) =~ s/\.//rg);
my $username = pack("H*", $radius_request->{'User-Name'});
my $anonce = pack('H*', pf::util::wpa::strip_hex_prefix($radius_request->{'Ruckus-DPSK-Anonce'}));
my $snonce = pf::util::wpa::snonce_from_eapol_key_frame(pack("H*", pf::util::wpa::strip_hex_prefix($radius_request->{"Ruckus-DPSK-EAPOL-Key-Frame"})));
my $eapol_key_frame = pack("H*", pf::util::wpa::strip_hex_prefix($radius_request->{"Ruckus-DPSK-EAPOL-Key-Frame"}));
my $anonce = pack('H*', sprintf("%v02x",$radius_request->{'Ruckus-DPSK-Anonce'}) =~ s/\.//rg);
my $snonce = pf::util::wpa::snonce_from_eapol_key_frame(pack("H*",sprintf("%v02x",$radius_request->{"Ruckus-DPSK-EAPOL-Key-Frame"}) =~ s/\.//rg));
my $eapol_key_frame = pack("H*", sprintf("%v02x",$radius_request->{"Ruckus-DPSK-EAPOL-Key-Frame"}) =~ s/\.//rg);
my $cache = $self->cache;
# Try first the pid of the mac address
if (exists $args->{'owner'} && $args->{'owner'}->{'pid'} ne "" && exists $args->{'owner'}->{'psk'} && defined $args->{'owner'}->{'psk'} && $args->{'owner'}->{'psk'} ne "") {
Expand Down

0 comments on commit 72b9ed9

Please sign in to comment.