diff options
-rwxr-xr-x | usr/local/www/diag_dump_states.php | 12 |
1 files changed, 10 insertions, 2 deletions
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]); + } ?> <tr valign="top" id="r:<?= $srcip ?>:<?= $dstip ?>"> |