Commit b68cd074 authored by Ad Schellevis's avatar Ad Schellevis

(filter) add getInterfaceMapping() to Firewall->Plugin, fix setInterfaceMapping()

parent 237c652e
...@@ -37,7 +37,7 @@ class Plugin ...@@ -37,7 +37,7 @@ class Plugin
{ {
private $anchors = array(); private $anchors = array();
private $filterRules = array(); private $filterRules = array();
private $interfaceMapping ; private $interfaceMapping = array();
private $interfaceStaticMapping; private $interfaceStaticMapping;
/** /**
...@@ -45,9 +45,6 @@ class Plugin ...@@ -45,9 +45,6 @@ class Plugin
*/ */
public function __construct() public function __construct()
{ {
// set static mappings
$this->interfaceMapping = array();
$this->interfaceMapping['loopback'] = array('if' => 'lo0');
} }
/** /**
...@@ -56,9 +53,19 @@ class Plugin ...@@ -56,9 +53,19 @@ class Plugin
*/ */
public function setInterfaceMapping(&$mapping) public function setInterfaceMapping(&$mapping)
{ {
$this->interfaceMapping = array();
$this->interfaceMapping['loopback'] = array('if' => 'lo0', 'descr' => 'loopback');
$this->interfaceMapping = array_merge($this->interfaceMapping, $mapping); $this->interfaceMapping = array_merge($this->interfaceMapping, $mapping);
} }
/**
* @return array
*/
public function getInterfaceMapping()
{
return $this->interfaceMapping;
}
/** /**
* register anchor * register anchor
* @param string $name anchor name * @param string $name anchor name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment