diff --git a/usr/local/www/diag_logs_filter.php b/usr/local/www/diag_logs_filter.php
index e4cf99609a..09a683fe18 100755
--- a/usr/local/www/diag_logs_filter.php
+++ b/usr/local/www/diag_logs_filter.php
@@ -46,6 +46,20 @@
require("guiconfig.inc");
require_once("filter_log.inc");
+# --- AJAX RESOLVE ---
+if (isset($_POST['resolve'])) {
+ $ip = strtolower($_POST['resolve']);
+ $res = (is_ipaddr($ip) ? gethostbyaddr($ip) : '');
+
+ if ($res && $res != $ip)
+ $response = array('resolve_ip' => $ip, 'resolve_text' => $res);
+ else
+ $response = array('resolve_ip' => $ip, 'resolve_text' => gettext("Cannot resolve"));
+
+ echo json_encode(str_replace("\\","\\\\", $response)); // single escape chars can break JSON decode
+ exit;
+}
+
function getGETPOSTsettingvalue($settingname, $default)
{
$settingvalue = $default;
@@ -351,25 +365,21 @@ include("head.inc");
}
$srcstr = $filterent['srcip'] . get_port_with_service($filterent['srcport'], $proto);
+ $src_htmlclass = str_replace('.', '-', $filterent['srcip']);
$dststr = $filterent['dstip'] . get_port_with_service($filterent['dstport'], $proto);
+ $dst_htmlclass = str_replace('.', '-', $filterent['dstip']);
?>
- &dialog_output=true', outputrule);" title="=gettext("Reverse Resolve with DNS");?>">
-
- ">
-
+ ');" title="=gettext("Click to resolve");?>" class="ICON-= $src_htmlclass; ?>" border="0" src="/themes/= $g['theme']; ?>/images/icons/icon_log.gif" alt="Icon Reverse Resolve with DNS"/>
" title="=gettext("Easy Rule: Add to Block List");?>" onclick="return confirm('=gettext("Do you really want to add this BLOCK rule?")."\n\n".gettext("Easy Rule is still experimental.")."\n".gettext("Continue at risk of your own peril.")."\n".gettext("Backups are also nice.")?>')">
-
+ ';?>
|
- &dialog_output=true', outputrule);" title="=gettext("Reverse Resolve with DNS");?>">
-
- ">
-
+ ');" title="=gettext("Click to resolve");?>" class="ICON-= $dst_htmlclass; ?>" border="0" src="/themes/= $g['theme']; ?>/images/icons/icon_log.gif" alt="Icon Reverse Resolve with DNS"/>
" title="=gettext("Easy Rule: Pass this traffic");?>" onclick="return confirm('=gettext("Do you really want to add this PASS rule?")."\n\n".gettext("Easy Rule is still experimental.")."\n".gettext("Continue at risk of your own peril.")."\n".gettext("Backups are also nice.");?>')">
-
+ ';?>
|
TCP Flags: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, W - CWR
+
+
+
+