From e565e9498148de56552b46a1f124abfdf4d105fc Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Fri, 24 Jun 2016 22:18:04 -0500 Subject: [PATCH] pfSense_get_pf_states always returns source as src and dest as dst, this flipping based on direction is wrong. Ticket #6530 --- src/usr/local/www/diag_dump_states.php | 30 +++++++++----------------- 1 file 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 4b6316a1ab..a1c68e3276 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 .= " <- "; - $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']); ?>