mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
interfaces: convert ipsec devices
Removes them from get_interface_list() and shows their description on the assignments page. It's already in the interface name but we should adhere to consistency in the select box.
This commit is contained in:
parent
394d8e10f5
commit
b386e61d82
@ -551,34 +551,35 @@ function get_interface_list($only_active = false, $include_dmesg = false)
|
||||
|
||||
/* list of virtual interface types */
|
||||
$vfaces = [
|
||||
'_stf',
|
||||
'_vip',
|
||||
'_vlan',
|
||||
'_wlan',
|
||||
'bridge',
|
||||
'carp',
|
||||
'enc',
|
||||
'faith',
|
||||
'gif',
|
||||
'gre',
|
||||
'ipfw',
|
||||
'l2tp',
|
||||
'lagg',
|
||||
'lo',
|
||||
'ng',
|
||||
'ovpnc',
|
||||
'ovpns',
|
||||
'pflog',
|
||||
'pfsync',
|
||||
'plip',
|
||||
'ppp',
|
||||
'pppoe',
|
||||
'pptp',
|
||||
'qinq',
|
||||
'sl',
|
||||
'tap',
|
||||
'tun',
|
||||
'vlan',
|
||||
'_stf',
|
||||
'_vip',
|
||||
'_vlan',
|
||||
'_wlan',
|
||||
'bridge',
|
||||
'carp',
|
||||
'enc',
|
||||
'faith',
|
||||
'gif',
|
||||
'gre',
|
||||
'ipfw',
|
||||
'ipsec',
|
||||
'l2tp',
|
||||
'lagg',
|
||||
'lo',
|
||||
'ng',
|
||||
'ovpnc',
|
||||
'ovpns',
|
||||
'pflog',
|
||||
'pfsync',
|
||||
'plip',
|
||||
'ppp',
|
||||
'pppoe',
|
||||
'pptp',
|
||||
'qinq',
|
||||
'sl',
|
||||
'tap',
|
||||
'tun',
|
||||
'vlan',
|
||||
];
|
||||
|
||||
$ifnames_wlan = legacy_interface_listget('wlan');
|
||||
|
||||
@ -214,8 +214,13 @@ function ipsec_devices()
|
||||
$devices = [];
|
||||
$names = [];
|
||||
|
||||
foreach (array_keys(ipsec_get_configured_vtis()) as $device) {
|
||||
$names[$device] = null;
|
||||
foreach (ipsec_get_configured_vtis() as $device => $details) {
|
||||
$names[$device] = [
|
||||
'descr' => sprintf('%s (%s)', $device, $details['descr']),
|
||||
'ifdescr' => sprintf('%s', $details['descr']),
|
||||
'section' => 'ipsec',
|
||||
'name' => $device,
|
||||
];
|
||||
}
|
||||
|
||||
$devices[] = [
|
||||
@ -227,7 +232,7 @@ function ipsec_devices()
|
||||
'type' => 'ipsec',
|
||||
];
|
||||
|
||||
$devices[] = ['pattern' => '^enc', 'volatile' => true];
|
||||
$devices[] = ['pattern' => '^enc|^ipsec', 'volatile' => true];
|
||||
|
||||
return $devices;
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ function loopback_devices()
|
||||
'pattern' => '^lo',
|
||||
'volatile' => true,
|
||||
'type' => 'loopback',
|
||||
'names' =>$names,
|
||||
'names' => $names,
|
||||
]];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user