From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastien GISLAIN To: development@lists.ipfire.org Subject: [PATCH 2/2] dhcp.cgi: Add column with resolved hostname by IP address Date: Sat, 11 Nov 2023 10:33:29 +0100 Message-ID: <20231111093329.17037-1-sebastien.gislain@free.fr> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0039477062287442293==" List-Id: --===============0039477062287442293== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable In web interface, on page DHCP Server, in table Current fixed leases, add col= umn with resolved hostname by IP address --- html/cgi-bin/dhcp.cgi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi index aabf565d7..b87da6907 100755 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -1008,9 +1008,9 @@ END print < - $Lang::tr{'mac address'} - $Lang::tr{'ip address'} - $Lang::tr{'hostname'} + $Lang::tr{'mac address'} + $Lang::tr{'ip address'} + $Lang::tr{'hostname'} $Lang::tr{'remark'} next-server= filename @@ -1111,7 +1111,7 @@ foreach my $line (@current2) { # resolved name (if exists) my $iaddr =3D inet_aton($temp[1]); my $rname =3D gethostbyaddr($iaddr, AF_INET); - if (!$rname || $rname eq "") { $rname =3D $Lang::tr{'lookup failed'}; } + if (!$rname || $rname eq "") { $rname =3D $Lang::tr{'ptr lookup failed'}; } print <$TAG2$temp[0]$TAG3 $TAG0$temp[1]$TAG1 --=20 2.39.2 --===============0039477062287442293==--