From 874e5f2cc93e35ac2f8609e22e8a346f8487e526 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 2 Nov 2010 12:52:10 -0400 Subject: [PATCH] Fix VPN log page to use the updated log format (again). Ticket #912. --- usr/local/www/diag_logs_vpn.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/usr/local/www/diag_logs_vpn.php b/usr/local/www/diag_logs_vpn.php index 025663d9d5..6e927d1f46 100755 --- a/usr/local/www/diag_logs_vpn.php +++ b/usr/local/www/diag_logs_vpn.php @@ -74,18 +74,19 @@ function dump_clog_vpn($logfile, $tail) { foreach ($logarr as $logent) { $logent = preg_split("/\s+/", $logent, 6); $llent = explode(",", $logent[5]); - if ($llent[0] != $vpntype) + $iftype = substr($llent[1], 0, 4); + if ($iftype != $vpntype) continue; echo "\n"; echo "" . htmlspecialchars(join(" ", array_slice($logent, 0, 3))) . "\n"; - if ($llent[1] == "login") + if ($llent[0] == "login") echo "\n"; else echo "\n"; - echo "" . htmlspecialchars($llent[4]) . "\n"; - echo "" . htmlspecialchars($llent[3]) . " \n"; + echo "" . htmlspecialchars($llent[3]) . "\n"; + echo "" . htmlspecialchars($llent[2]) . " \n"; echo "\n"; } } @@ -121,7 +122,7 @@ include("head.inc"); - gettext("PPTP"), "pppoe" => gettext("PPPoE"), "l2tp" => gettext("L2TP")); + gettext("PPTP"), "poes" => gettext("PPPoE"), "l2tp" => gettext("L2TP")); foreach ($vpns as $kvpn => $dvpn): ?>