]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Check if the last logged in server and client ip are valid before calling gethostbyaddr
authorkkalev <kkalev>
Thu, 4 Jul 2002 08:06:36 +0000 (08:06 +0000)
committerkkalev <kkalev>
Thu, 4 Jul 2002 08:06:36 +0000 (08:06 +0000)
Changelog
htdocs/user_admin.php3

index 7af8c41ee9afd616938c679fe9defab73a7bd078..4e7634c200a734f8112186b023d16fee47b2d5af 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -13,6 +13,7 @@ Ver 1.30:
 * Fix a small bug in user_admin.php3.
 * Pass the whole password as salt in da_encrypt() in password_check.php3
 * Refresh the online users page every 50 secs. Patch by Alexandre Strube <surak@barroco.com.br>
+* Check if the last logged in server and client ip are valid before calling gethostbyaddr
 Ver 1.29:
 * Add general_ld_library_path directive and set LD_LIBRARY_PATH accordingly (used in snmpfinger and
   radaclient).
index 56fed3794ee227654ed403142695bc34e3081d0b..1366275fb8ef5de34a38aef2e8712b5ee784a01a 100644 (file)
@@ -197,8 +197,8 @@ if ($link){
                                $lastlog_server_port = $row['NASPortId'];
                                $lastlog_session_time = time2str($row['AcctSessionTime']);
                                $lastlog_client_ip = $row['FramedIPAddress'];   
-                               $lastlog_server_name = gethostbyaddr($lastlog_server_ip);
-                               $lastlog_client_name = gethostbyaddr($lastlog_client_ip);
+               $lastlog_server_name = ($lastlog_server_ip != '') ? gethostbyaddr($lastlog_server_ip) : '-';
+               $lastlog_client_name = ($lastlog_client_ip != '') ? gethostbyaddr($lastlog_client_ip) : '-';
                                $lastlog_input = $row['AcctInputOctets'];
                                $lastlog_input = bytes2str($lastlog_input);
                                $lastlog_output = $row['AcctOutputOctets'];