From c5dbb02f91e0abe3e409ad42a7b6fe27e3e60a6c Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Thu, 30 Jul 2015 00:16:15 -0500 Subject: Use the appropriate source and dest IPs for all state types. Ticket #4907 --- usr/local/www/diag_dump_states.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'usr') diff --git a/usr/local/www/diag_dump_states.php b/usr/local/www/diag_dump_states.php index 1f947fd..604248f 100755 --- a/usr/local/www/diag_dump_states.php +++ b/usr/local/www/diag_dump_states.php @@ -198,9 +198,17 @@ while ($line = chop(fgets($fd))) { /* break up info and extract $srcip and $dstip */ $ends = preg_split("/\?/", $info); $parts = explode(":", $ends[0]); - $srcip = trim($parts[0]); + if (strstr($info, "->")) { + $srcip = trim($parts[0]); + } else { + $dstip = trim($parts[0]); + } $parts = explode(":", $ends[count($ends) - 1]); - $dstip = trim($parts[0]); + if (strstr($info, "->")) { + $dstip = trim($parts[0]); + } else { + $srcip = trim($parts[0]); + } ?> -- cgit v1.1