summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-07-08 11:04:53 +0930
committerGitHub <noreply@github.com>2016-07-08 11:04:53 +0930
commit30df6b722d577fe8c1b38476244bfb797ec89b5a (patch)
tree288b1c4f4472dc3e40eaef36d20a8681dd72cbb5 /src/usr
parent1729ee29012ec92e61bc1d005635f9275fae3a4e (diff)
downloadpfsense-30df6b722d577fe8c1b38476244bfb797ec89b5a.zip
pfsense-30df6b722d577fe8c1b38476244bfb797ec89b5a.tar.gz
Fix #6585 Do not use [] syntax for lookups
IPv6 address plus port is displayed with the format [1:2::3]:80 - the address is in square brackets followed by colon and the port number. This is necessary to disambiguate the port from the address, a good thing. But it messes up the use of the IPv6 address for reverse lookup. Keep the "raw" format of the IPv6 address pass that to the reverse lookup code, and use it for generating the htmlclass names that enable the answer to be slotted in for display.
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/status_logs_filter.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/usr/local/www/status_logs_filter.php b/src/usr/local/www/status_logs_filter.php
index 8c7d6a2..acd5c2b 100644
--- a/src/usr/local/www/status_logs_filter.php
+++ b/src/usr/local/www/status_logs_filter.php
@@ -248,6 +248,8 @@ if (!$rawfilter) {
$int = strtolower($filterent['interface']);
$proto = strtolower($filterent['proto']);
+ $rawsrcip = $filterent['srcip'];
+ $rawdstip = $filterent['dstip'];
if ($filterent['version'] == '6') {
$ipproto = "inet6";
@@ -258,12 +260,12 @@ if (!$rawfilter) {
}
$srcstr = $filterent['srcip'] . get_port_with_service($filterent['srcport'], $proto);
- $src_htmlclass = str_replace(array('.', ':'), '-', $filterent['srcip']);
+ $src_htmlclass = str_replace(array('.', ':'), '-', $rawsrcip);
$dststr = $filterent['dstip'] . get_port_with_service($filterent['dstport'], $proto);
- $dst_htmlclass = str_replace(array('.', ':'), '-', $filterent['dstip']);
+ $dst_htmlclass = str_replace(array('.', ':'), '-', $rawdstip);
?>
<td class="text-nowrap">
- <i class="fa fa-info icon-pointer icon-primary" onclick="javascript:resolve_with_ajax('<?="{$filterent['srcip']}"; ?>');" title="<?=gettext("Click to resolve")?>">
+ <i class="fa fa-info icon-pointer icon-primary" onclick="javascript:resolve_with_ajax('<?="{$rawsrcip}"; ?>');" title="<?=gettext("Click to resolve")?>">
</i>
<a class="fa fa-minus-square-o icon-pointer icon-primary" href="easyrule.php?<?="action=block&amp;int={$int}&amp;src={$filterent['srcip']}&amp;ipproto={$ipproto}"; ?>" title="<?=gettext("Easy Rule: Add to Block List")?>" onclick="return confirm('<?=gettext("Confirmation required to add this BLOCK rule.")?>')">
@@ -272,7 +274,7 @@ if (!$rawfilter) {
<?=$srcstr . '<span class="RESOLVE-' . $src_htmlclass . '"></span>'?>
</td>
<td class="text-nowrap">
- <i class="fa fa-info icon-pointer icon-primary; ICON-<?= $dst_htmlclass; ?>" onclick="javascript:resolve_with_ajax('<?="{$filterent['dstip']}"; ?>');" title="<?=gettext("Click to resolve")?>">
+ <i class="fa fa-info icon-pointer icon-primary; ICON-<?= $dst_htmlclass; ?>" onclick="javascript:resolve_with_ajax('<?="{$rawdstip}"; ?>');" title="<?=gettext("Click to resolve")?>">
</i>
<a class="fa fa-plus-square-o icon-pointer icon-primary" href="easyrule.php?<?="action=pass&amp;int={$int}&amp;proto={$proto}&amp;src={$filterent['srcip']}&amp;dst={$filterent['dstip']}&amp;dstport={$filterent['dstport']}&amp;ipproto={$ipproto}"; ?>" title="<?=gettext("Easy Rule: Pass this traffic")?>" onclick="return confirm('<?=gettext("Confirmation required to add this PASS rule.")?>')">
OpenPOWER on IntegriCloud