summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_dump_states.php
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-06-24 22:18:04 -0500
committerChris Buechler <cmb@pfsense.org>2016-06-24 22:18:59 -0500
commitad5fb4a06001fc545ff596bd258a2ea26c426f59 (patch)
tree745557dcde19f1125ea23beec2f57b3e9a9a70b2 /src/usr/local/www/diag_dump_states.php
parente41468cf80aeea793b106603206e8ec4d493a1ae (diff)
downloadpfsense-ad5fb4a06001fc545ff596bd258a2ea26c426f59.zip
pfsense-ad5fb4a06001fc545ff596bd258a2ea26c426f59.tar.gz
pfSense_get_pf_states always returns source as src and dest as dst, this flipping based on direction is wrong. Ticket #6530
Diffstat (limited to 'src/usr/local/www/diag_dump_states.php')
-rwxr-xr-xsrc/usr/local/www/diag_dump_states.php30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/usr/local/www/diag_dump_states.php b/src/usr/local/www/diag_dump_states.php
index 4b6316a..a1c68e3 100755
--- a/src/usr/local/www/diag_dump_states.php
+++ b/src/usr/local/www/diag_dump_states.php
@@ -255,27 +255,17 @@ print $form;
}
for ($i = 0; $i < $states; $i++) {
- if ($res[$i]['direction'] === "out") {
- $info = $res[$i]['src'];
- if ($res[$i]['src-orig'])
- $info .= " (" . $res[$i]['src-orig'] . ")";
- $info .= " -> ";
- $info .= $res[$i]['dst'];
- if ($res[$i]['dst-orig'])
- $info .= " (" . $res[$i]['dst-orig'] . ")";
- $srcip = get_ip($res[$i]['src']);
- $dstip = get_ip($res[$i]['dst']);
- } else {
- $info = $res[$i]['dst'];
- if ($res[$i]['dst-orig'])
- $info .= " (" . $res[$i]['dst-orig'] . ")";
- $info .= " &lt;- ";
- $info .= $res[$i]['src'];
- if ($res[$i]['src-orig'])
- $info .= " (" . $res[$i]['src-orig'] . ")";
- $srcip = get_ip($res[$i]['dst']);
- $dstip = get_ip($res[$i]['src']);
+ $info = $res[$i]['src'];
+ if ($res[$i]['src-orig']) {
+ $info .= " (" . $res[$i]['src-orig'] . ")";
}
+ $info .= " -> ";
+ $info .= $res[$i]['dst'];
+ if ($res[$i]['dst-orig']) {
+ $info .= " (" . $res[$i]['dst-orig'] . ")";
+ }
+ $srcip = get_ip($res[$i]['src']);
+ $dstip = get_ip($res[$i]['dst']);
?>
<tr>
OpenPOWER on IntegriCloud