diff --git a/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php b/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php index b461ddacfc..e2af9d854b 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php +++ b/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php @@ -220,10 +220,10 @@ class Plugin * @param bool $quick * @return null */ - public function registerAnchor($name, $type = "fw", $priority = 0, $placement = "tail", $quick = false, $ifs = null) + public function registerAnchor($name, $type = "fw", $priority = 0, $placement = "tail", $quick = false) { $anchorKey = sprintf("%s.%s.%08d.%08d", $type, $placement, $priority, count($this->anchors)); - $this->anchors[$anchorKey] = ['name' => $name, 'quick' => $quick, 'ifs' => $ifs]; + $this->anchors[$anchorKey] = ['name' => $name, 'quick' => $quick]; ksort($this->anchors); } @@ -239,21 +239,9 @@ class Plugin foreach (explode(',', $types) as $type) { foreach ($this->anchors as $anchorKey => $anchor) { if (strpos($anchorKey, "{$type}.{$placement}") === 0) { - $result .= ($type == "fw" || $type == "ether") ? "" : "{$type}-"; - $prefix = $type == "ether" ? "ether " : ""; - $result .= "{$prefix}anchor \"{$anchor['name']}\""; if ($anchor['quick']) { $result .= " quick"; } - if (!empty($anchor['ifs'])) { - $ifs = array_filter(array_map(function ($if) { - return $this->interfaceMapping[$if]['if'] ?? null; - }, explode(',', $anchor['ifs']))); - - if (!empty($ifs)) { - $result .= " on {" . implode(', ', $ifs) . "}"; - } - } $result .= "\n"; } }