mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
src: style sweep
This commit is contained in:
parent
e5c2ac5909
commit
4acc838e4d
@ -113,7 +113,7 @@ class LeasesController extends ApiControllerBase
|
||||
/* include manufacturer info */
|
||||
$leases[$idx]['man'] = '';
|
||||
if ($lease['mac'] != '') {
|
||||
$mac_hi = strtoupper(substr(str_replace(':', '', $lease['mac']),0, 6));
|
||||
$mac_hi = strtoupper(substr(str_replace(':', '', $lease['mac']), 0, 6));
|
||||
$leases[$idx]['man'] = $mac_man[$mac_hi];
|
||||
}
|
||||
|
||||
|
||||
@ -118,7 +118,7 @@ class LeasesController extends ApiControllerBase
|
||||
foreach ($config->dhcpdv6->children() as $dhcpif => $dhcpifconf) {
|
||||
$if = $config->interfaces->$dhcpif;
|
||||
if (!empty((string)$if->ipaddrv6) && !empty((string)$if->subnetv6)) {
|
||||
$if_ranges[$dhcpif] = (string)$if->ipaddrv6.'/'.(string)$if->subnetv6;
|
||||
$if_ranges[$dhcpif] = (string)$if->ipaddrv6 . '/' . (string)$if->subnetv6;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -354,7 +354,7 @@ class Util
|
||||
|
||||
private static function isIPv6InCIDR($ip, $cidr)
|
||||
{
|
||||
$inet_to_bits = function($ip) {
|
||||
$inet_to_bits = function ($ip) {
|
||||
$split = str_split($ip);
|
||||
$bin_ip = '';
|
||||
foreach ($split as $char) {
|
||||
|
||||
@ -247,5 +247,4 @@ class ArrayField extends BaseField
|
||||
yield $key => $node;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -33,7 +33,6 @@ namespace OPNsense\Firewall\FieldTypes;
|
||||
use OPNsense\Base\FieldTypes\ArrayField;
|
||||
use OPNsense\Base\FieldTypes\TextField;
|
||||
|
||||
|
||||
class GroupField extends ArrayField
|
||||
{
|
||||
protected static $internalStaticChildren = [];
|
||||
|
||||
@ -32,7 +32,6 @@ use OPNsense\Base\FieldTypes\BaseField;
|
||||
use OPNsense\Base\Validators\CallbackValidator;
|
||||
use OPNsense\Core\Config;
|
||||
|
||||
|
||||
/**
|
||||
* Class GroupNameField
|
||||
* @package OPNsense\Base\FieldTypes
|
||||
|
||||
@ -52,4 +52,4 @@ class InterfaceField extends BaseListField
|
||||
$this->internalOptionList = self::$parent_interfaces;
|
||||
return parent::actionPostLoadingEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,7 +37,6 @@ use OPNsense\Core\Config;
|
||||
|
||||
class SPDField extends ArrayField
|
||||
{
|
||||
|
||||
protected static $internalStaticChildren = [];
|
||||
|
||||
/**
|
||||
|
||||
@ -63,7 +63,7 @@ class VTIField extends ArrayField
|
||||
foreach ($this->iterateItems() as $key => $node) {
|
||||
$type_node = new TextField();
|
||||
$type_node->setInternalIsVirtual();
|
||||
$type_node->setValue(strpos($key, 'ipsec') === 0 ? 'legacy' : 'vti' );
|
||||
$type_node->setValue(strpos($key, 'ipsec') === 0 ? 'legacy' : 'vti');
|
||||
$node->addChildNode('origin', $type_node);
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ if (isset($opts['s'])) {
|
||||
|
||||
$removed_leases = 0;
|
||||
$fin = @fopen($dhcp_lease_file, "r+");
|
||||
$fout = @fopen($dhcp_lease_file.".new", "w");
|
||||
$fout = @fopen($dhcp_lease_file . ".new", "w");
|
||||
if ($fin && flock($fin, LOCK_EX)) {
|
||||
$iaaddr = "";
|
||||
$content_to_flush = array();
|
||||
|
||||
@ -1,50 +1,50 @@
|
||||
[list.leases]
|
||||
command:/usr/local/opnsense/scripts/dhcp/get_leases6.py
|
||||
parameters:--inactive %s
|
||||
type:script_output
|
||||
message:list dhcpv6 leases %s
|
||||
|
||||
[list.static]
|
||||
command:/usr/local/sbin/pluginctl -r static_mapping 6
|
||||
parameters:%s
|
||||
type:script_output
|
||||
message: list dhcpv6 static mappings %s
|
||||
|
||||
[update.prefixes]
|
||||
command:/usr/local/opnsense/scripts/dhcp/prefixes.php
|
||||
parameters:
|
||||
type:script
|
||||
message:update IPv6 prefixes
|
||||
|
||||
[start]
|
||||
command:/usr/local/sbin/pluginctl -s dhcpd6 start
|
||||
parameters:
|
||||
type:script
|
||||
message:Starting dhcpd6
|
||||
description:Start DHCPd6
|
||||
|
||||
[stop]
|
||||
command:/usr/local/sbin/pluginctl -s dhcpd6 stop
|
||||
parameters:
|
||||
type:script
|
||||
message:Stopping dhcpd6
|
||||
description:Stop DHCPd6
|
||||
|
||||
[restart]
|
||||
command:/usr/local/sbin/pluginctl -s dhcpd6 restart
|
||||
parameters:%s
|
||||
type:script
|
||||
message:Restarting %s dhcpd6
|
||||
description:Restart DHCPd6
|
||||
|
||||
[status]
|
||||
command:/usr/local/sbin/pluginctl -s dhcpd6 status
|
||||
parameters:
|
||||
type:script_output
|
||||
message:Request DHCPd6 status
|
||||
|
||||
[remove.lease]
|
||||
command:/usr/local/opnsense/scripts/dhcp/cleanup_leases6.php
|
||||
parameters:-d=%s -s
|
||||
type:script_output
|
||||
message:remove lease for %s
|
||||
[list.leases]
|
||||
command:/usr/local/opnsense/scripts/dhcp/get_leases6.py
|
||||
parameters:--inactive %s
|
||||
type:script_output
|
||||
message:list dhcpv6 leases %s
|
||||
|
||||
[list.static]
|
||||
command:/usr/local/sbin/pluginctl -r static_mapping 6
|
||||
parameters:%s
|
||||
type:script_output
|
||||
message: list dhcpv6 static mappings %s
|
||||
|
||||
[update.prefixes]
|
||||
command:/usr/local/opnsense/scripts/dhcp/prefixes.php
|
||||
parameters:
|
||||
type:script
|
||||
message:update IPv6 prefixes
|
||||
|
||||
[start]
|
||||
command:/usr/local/sbin/pluginctl -s dhcpd6 start
|
||||
parameters:
|
||||
type:script
|
||||
message:Starting dhcpd6
|
||||
description:Start DHCPd6
|
||||
|
||||
[stop]
|
||||
command:/usr/local/sbin/pluginctl -s dhcpd6 stop
|
||||
parameters:
|
||||
type:script
|
||||
message:Stopping dhcpd6
|
||||
description:Stop DHCPd6
|
||||
|
||||
[restart]
|
||||
command:/usr/local/sbin/pluginctl -s dhcpd6 restart
|
||||
parameters:%s
|
||||
type:script
|
||||
message:Restarting %s dhcpd6
|
||||
description:Restart DHCPd6
|
||||
|
||||
[status]
|
||||
command:/usr/local/sbin/pluginctl -s dhcpd6 status
|
||||
parameters:
|
||||
type:script_output
|
||||
message:Request DHCPd6 status
|
||||
|
||||
[remove.lease]
|
||||
command:/usr/local/opnsense/scripts/dhcp/cleanup_leases6.php
|
||||
parameters:-d=%s -s
|
||||
type:script_output
|
||||
message:remove lease for %s
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user