mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
(filter) add getInterfaceMapping() to Firewall->Plugin, fix setInterfaceMapping()
This commit is contained in:
parent
237c652e4f
commit
b68cd07418
@ -37,7 +37,7 @@ class Plugin
|
||||
{
|
||||
private $anchors = array();
|
||||
private $filterRules = array();
|
||||
private $interfaceMapping ;
|
||||
private $interfaceMapping = array();
|
||||
private $interfaceStaticMapping;
|
||||
|
||||
/**
|
||||
@ -45,9 +45,6 @@ class Plugin
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// set static mappings
|
||||
$this->interfaceMapping = array();
|
||||
$this->interfaceMapping['loopback'] = array('if' => 'lo0');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -56,9 +53,19 @@ class Plugin
|
||||
*/
|
||||
public function setInterfaceMapping(&$mapping)
|
||||
{
|
||||
$this->interfaceMapping = array();
|
||||
$this->interfaceMapping['loopback'] = array('if' => 'lo0', 'descr' => 'loopback');
|
||||
$this->interfaceMapping = array_merge($this->interfaceMapping, $mapping);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getInterfaceMapping()
|
||||
{
|
||||
return $this->interfaceMapping;
|
||||
}
|
||||
|
||||
/**
|
||||
* register anchor
|
||||
* @param string $name anchor name
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user