[RADIATOR] [Patch] avoid warning on missing User-Name

Roland Rosenfeld rrosenfeld at netcologne.de
Wed Feb 13 15:34:19 UTC 2019


Hi,

I noticed the following issue with Radiator 4.22:
On accounting A10 CGN gateway, there is the User-Name field missing in
the accounting records.  This results in Radius/Client.pm line 777
warning, that it tries to split an uninitialized variable.

The following patch works around this issue, maybe this helps someone
with the same setup.

--- Radius/Client.pm.org       2018-12-19 14:01:07.000000000 +0100
+++ Radius/Client.pm   2019-01-22 13:30:18.660185379 +0100
@@ -774,7 +774,9 @@
                        unless $self->{NoIgnoreDuplicates}{$code};
                }
 
-               my ($user, $realmName) = split(/@/, $p->getUserName);
+               my $gun = $p->getUserName;
+               $gun = '' unless defined $gun;
+               my ($user, $realmName) = split(/@/, $gun);
                # Maybe use a default realm to find the Realm
                # or Handler later?
                if (defined $user 

Greetings
Roland

-- 
Roland Rosenfeld  -  Teamverantwortlicher Content Delivery  -  NED  -  Technik
NETCOLOGNE Gesellschaft für Telekommunikation mbH
Am Coloneum 9   50829 Köln   Tel.: +49 221 2222-373   Fax: +49 221 2222-7373
Geschäftsführung: Timo von Lepel
Vorsitzender des Aufsichtsrates: Dr. Andreas Cerbe        HRB 25580, AG Köln


More information about the radiator mailing list