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): ?>