mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
load ipfw when either CP or the trafficshaper is enabled, final take on https://github.com/opnsense/core/issues/2569
This commit is contained in:
parent
32aa199882
commit
82d207f98c
@ -1068,7 +1068,7 @@ function system_kernel_configure($verbose = false)
|
||||
$mods[] = $config['system']['thermal_hardware'];
|
||||
}
|
||||
|
||||
if (!empty($config['OPNsense']['TrafficShaper']['rules']['rule'])) {
|
||||
if ((new \OPNsense\TrafficShaper\TrafficShaper())->isEnabled() || (new \OPNsense\CaptivePortal())->isEnabled()) {
|
||||
$mods[] = "ipfw";
|
||||
$mods[] = "dummynet";
|
||||
}
|
||||
|
||||
@ -139,4 +139,17 @@ class TrafficShaper extends BaseModel
|
||||
|
||||
return $seq;
|
||||
}
|
||||
|
||||
/**
|
||||
* retrieve last generated rule sequence number
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
foreach ($this->pipes->pipe->__items as $item) {
|
||||
if ((string)$item->enabled == "1") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user