Commit ad46bd0b authored by Franco Fichtner's avatar Franco Fichtner

interfaces: wireless parents can't be assigned #411

And the clones are picked up by the config section...

(cherry picked from commit 4e95140f)
(cherry picked from commit d0419d15)
parent b5e07622
......@@ -45,16 +45,19 @@ function list_interfaces() {
// define config sections to fetch interfaces from.
$config_sections = array();
$config_sections['wireless.clone'] = array('descr' => 'cloneif', 'key' => 'cloneif');
$config_sections['vlans.vlan'] = array('descr' => "tag,if,descr", 'format' => gettext('vlan %s on %s') . ' (%s)', 'key' => 'vlanif');
$config_sections['wireless.clone'] = array('descr' => 'cloneif,descr', 'key' => 'cloneif', 'format' => '%s (%s)');
$config_sections['vlans.vlan'] = array('descr' => 'tag,if,descr', 'format' => gettext('vlan %s on %s') . ' (%s)', 'key' => 'vlanif');
$config_sections['bridges.bridged'] = array('descr' => 'bridgeif, descr', 'key' => 'bridgeif', 'format' => '%s (%s)');
$config_sections['gifs.gif'] = array('descr' => 'remote-addr,descr', 'key' => 'gifif', 'format' => 'gif %s (%s)');
$config_sections['gres.gre'] = array('descr' => 'remote-addr,descr', 'key' => 'greif', 'format' => 'gre %s (%s)');
$config_sections['laggs.lagg'] = array('descr' => 'laggif, descr', 'key' => 'laggif', 'format' => '%s (%s)', 'fields' => 'members');
$config_sections['laggs.lagg'] = array('descr' => 'laggif,descr', 'key' => 'laggif', 'format' => '%s (%s)', 'fields' => 'members');
$config_sections['ppps.ppp'] = array('descr' => 'if,ports,descr,username', 'key' => 'if','format' => '%s (%s) - %s %s', 'fields' => 'type');
// add physical network interfaces
foreach (get_interface_list() as $key => $intf_item) {
if (match_wireless_interface($key)) {
continue;
}
$interfaces[$key] = array('descr' => $key . ' (' . $intf_item['mac'] . ')', 'section' => 'interfaces');
}
// collect interfaces from defined config sections
......
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