mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 02:54:38 +00:00
interfaces: port status-only probe
This commit is contained in:
parent
c46d5ad0e9
commit
9b94d2f2f6
@ -2701,8 +2701,8 @@ EOD;
|
||||
/* find which clones are up and bring them down */
|
||||
$clones_up = array();
|
||||
foreach ($clone_list as $clone_if) {
|
||||
$clone_status = pfSense_get_interface_addresses($clone_if);
|
||||
if ($clone_status['status'] == 'up') {
|
||||
$clone_status = legacy_interface_stats($clone_if);
|
||||
if ($clone_status['link state'] == '2') {
|
||||
$clones_up[] = $clone_if;
|
||||
mwexec("{$ifconfig} " . escapeshellarg($clone_if) . " down");
|
||||
}
|
||||
@ -5097,20 +5097,19 @@ function get_interface_info($ifdescr)
|
||||
|
||||
$chkif = $ifinfo['if'];
|
||||
$ifinfotmp = pfSense_get_interface_addresses($chkif);
|
||||
$ifinfo['status'] = $ifinfotmp['status'];
|
||||
if (empty($ifinfo['status'])) {
|
||||
$ifinfo['status'] = 'down';
|
||||
}
|
||||
$ifinfo['macaddr'] = $ifinfotmp['macaddr'];
|
||||
$ifinfo['ipaddr'] = $ifinfotmp['ipaddr'];
|
||||
$ifinfo['subnet'] = $ifinfotmp['subnet'];
|
||||
$ifinfo['linklocal'] = get_interface_linklocal($ifdescr);
|
||||
$ifinfo['ipaddrv6'] = get_interface_ipv6($ifdescr);
|
||||
$ifinfo['subnetv6'] = get_interface_subnetv6($ifdescr);
|
||||
if (isset($ifinfotmp['link0'])) {
|
||||
$link0 = 'down';
|
||||
}
|
||||
|
||||
$ifinfo['linklocal'] = get_interface_linklocal($ifdescr);
|
||||
$ifinfo['ipaddrv6'] = get_interface_ipv6($ifdescr);
|
||||
$ifinfo['subnetv6'] = get_interface_subnetv6($ifdescr);
|
||||
|
||||
$ifinfotmp = legacy_interface_stats($chkif);
|
||||
$ifinfo['status'] = $ifinfotmp['link state'] == '2' ? 'up' : 'down';
|
||||
$ifinfo['inerrs'] = $ifinfotmp['input errors'];
|
||||
$ifinfo['outerrs'] = $ifinfotmp['output errors'];
|
||||
$ifinfo['collisions'] = $ifinfotmp['collisions'];
|
||||
|
||||
@ -902,10 +902,8 @@ function get_interface_list($only_active = false)
|
||||
|
||||
foreach ($ifnames as $ifname) {
|
||||
$ifinfo = legacy_interface_stats($ifname);
|
||||
if (isset($ifinfo['link state'])) {
|
||||
if ($ifinfo['link state'] == '2') {
|
||||
$_ifnames[] = $ifname;
|
||||
}
|
||||
if ($ifinfo['link state'] == '2') {
|
||||
$_ifnames[] = $ifname;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user