mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix killing of individual states for IPv6. Ticket #4906
This commit is contained in:
parent
324ce0b913
commit
c7ea65c25a
@ -197,19 +197,35 @@ while ($line = chop(fgets($fd))) {
|
||||
|
||||
/* break up info and extract $srcip and $dstip */
|
||||
$ends = preg_split("/\<?-\>?/", $info);
|
||||
$parts = explode(":", $ends[0]);
|
||||
if (strstr($info, "->")) {
|
||||
$srcip = trim($parts[0]);
|
||||
if (strstr($info, "[")) {
|
||||
// IPv6
|
||||
$parts = explode("[", $ends[0]);
|
||||
if (strstr($info, "->")) {
|
||||
$srcip = trim($parts[0]);
|
||||
} else {
|
||||
$dstip = trim($parts[0]);
|
||||
}
|
||||
$parts = explode("[", $ends[count($ends) - 1]);
|
||||
if (strstr($info, "->")) {
|
||||
$dstip = trim($parts[0]);
|
||||
} else {
|
||||
$srcip = trim($parts[0]);
|
||||
}
|
||||
} else {
|
||||
$dstip = trim($parts[0]);
|
||||
// IPv4
|
||||
$parts = explode(":", $ends[0]);
|
||||
if (strstr($info, "->")) {
|
||||
$srcip = trim($parts[0]);
|
||||
} else {
|
||||
$dstip = trim($parts[0]);
|
||||
}
|
||||
$parts = explode(":", $ends[count($ends) - 1]);
|
||||
if (strstr($info, "->")) {
|
||||
$dstip = trim($parts[0]);
|
||||
} else {
|
||||
$srcip = trim($parts[0]);
|
||||
}
|
||||
}
|
||||
$parts = explode(":", $ends[count($ends) - 1]);
|
||||
if (strstr($info, "->")) {
|
||||
$dstip = trim($parts[0]);
|
||||
} else {
|
||||
$srcip = trim($parts[0]);
|
||||
}
|
||||
|
||||
?>
|
||||
<tr valign="top" id="r:<?= $srcip ?>:<?= $dstip ?>">
|
||||
<td class="listlr"><?= $iface ?></td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user