From 2e512b38fa6db63898d7b0a62184cd93b60a57bf Mon Sep 17 00:00:00 2001 From: Durand Fabrice Date: Tue, 1 Aug 2023 05:25:13 -0400 Subject: [PATCH] Fixes: Use of uninitialized value $port in addition (+) at /usr/local/pf/lib/pf/services/manager/radiusd_child.pm line 1673. (pf::services::manager::radiusd_child::generate_port) --- lib/pf/services/manager/radiusd_child.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/pf/services/manager/radiusd_child.pm b/lib/pf/services/manager/radiusd_child.pm index 9d42cab758b6..3454fe63c391 100644 --- a/lib/pf/services/manager/radiusd_child.pm +++ b/lib/pf/services/manager/radiusd_child.pm @@ -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';