mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
interfaces: kill is_jumbo_capable()
Introduced in 2005 to separate good VLAN-capable driver from the bad ones. We wonder how relevant this is nowadays. Breaks at least Xen where the driver fails to pass the host's VLAN capabilities. Discussed with: @adschellevis
This commit is contained in:
parent
d823cc7193
commit
33b3dabab3
@ -489,11 +489,9 @@ EOD;
|
||||
} else {
|
||||
$vlan_capable=0;
|
||||
foreach ($iflist as $iface => $ifa) {
|
||||
if (is_jumbo_capable($iface)) {
|
||||
echo sprintf("% -8s%s%s\n", $iface, $ifa['mac'],
|
||||
$ifa['up'] ? " (up)" : "");
|
||||
$vlan_capable++;
|
||||
}
|
||||
echo sprintf("% -8s%s%s\n", $iface, $ifa['mac'],
|
||||
$ifa['up'] ? " (up)" : "");
|
||||
$vlan_capable++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -506,8 +504,7 @@ EOD;
|
||||
$vlan['if'] = chop(fgets($fp));
|
||||
|
||||
if ($vlan['if']) {
|
||||
if (!array_key_exists($vlan['if'], $iflist) or
|
||||
!is_jumbo_capable($vlan['if'])) {
|
||||
if (!array_key_exists($vlan['if'], $iflist)) {
|
||||
printf("\nInvalid interface name '%s'\n", $vlan['if']);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -4451,14 +4451,6 @@ function get_interface_mac($interface)
|
||||
return $macinfo["macaddr"];
|
||||
}
|
||||
|
||||
function is_jumbo_capable($iface)
|
||||
{
|
||||
$intf_details = legacy_interface_details(trim($iface));
|
||||
|
||||
return isset($intf_details['capabilities']) &&
|
||||
in_array('vlan_mtu', $intf_details['capabilities']);
|
||||
}
|
||||
|
||||
function get_vip_descr($ipaddress)
|
||||
{
|
||||
global $config;
|
||||
|
||||
@ -155,10 +155,7 @@ include("head.inc");
|
||||
$portlist[$lagg['laggif']] = $lagg;
|
||||
}
|
||||
}
|
||||
foreach ($portlist as $ifn => $ifinfo):
|
||||
if (!is_jumbo_capable($ifn)) {
|
||||
continue;
|
||||
}?>
|
||||
foreach ($portlist as $ifn => $ifinfo): ?>
|
||||
<option value="<?=$ifn;?>" <?=$ifn == $pconfig['if'] ? " selected=\"selected\"" : "";?>>
|
||||
<?=htmlspecialchars($ifn);?> ( <?= !empty($ifinfo['mac']) ? $ifinfo['mac'] :"" ;?> )
|
||||
</option>
|
||||
|
||||
@ -174,10 +174,7 @@ include("head.inc");
|
||||
$portlist[$lagg['laggif']] = $lagg;
|
||||
}
|
||||
}
|
||||
foreach ($portlist as $ifn => $ifinfo):
|
||||
if (!is_jumbo_capable($ifn)) {
|
||||
continue;
|
||||
}?>
|
||||
foreach ($portlist as $ifn => $ifinfo): ?>
|
||||
<option value="<?=$ifn;?>" <?=$ifn == $pconfig['if'] ? " selected=\"selected\"" : "";?>>
|
||||
<?=htmlspecialchars($ifn);?>
|
||||
( <?= !empty($ifinfo['mac']) ? $ifinfo['mac'] :"" ;?> )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user