Skip to content

Commit

Permalink
Fixes: Use of uninitialized value $port in addition (+) at /usr/local…
Browse files Browse the repository at this point in the history
…/pf/lib/pf/services/manager/radiusd_child.pm line 1673.

 (pf::services::manager::radiusd_child::generate_port)
  • Loading branch information
fdurand committed Aug 1, 2023
1 parent d469ea0 commit 2e512b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/pf/services/manager/radiusd_child.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1627,8 +1627,10 @@ sub generate_container_environments {

my $port = 0;
if ($self->name eq 'radiusd-eduroam') {
my @eduroam_authentication_source = @{pf::authentication::getAuthenticationSourcesByType('Eduroam')};
$port = $eduroam_authentication_source[0]{'auth_listening_port'};
if ( @{pf::authentication::getAuthenticationSourcesByType('Eduroam')} ) {
my @eduroam_authentication_source = @{pf::authentication::getAuthenticationSourcesByType('Eduroam')};
$port = $eduroam_authentication_source[0]{'auth_listening_port'};
}
}
if ($self->name eq 'radiusd-auth') {
$port = '1812';
Expand Down

0 comments on commit 2e512b3

Please sign in to comment.