Do not allow lagg(4) members to be assigned.

This commit is contained in:
Ermal Luçi 2008-09-20 12:58:27 +00:00
parent 4f9b0f01d4
commit dbdd08afe1

View File

@ -36,7 +36,6 @@
##|*MATCH=interfaces_assign.php*
##|-PRIV
$pgtitle = array("Interfaces", "Assign network ports");
require("guiconfig.inc");
@ -80,11 +79,16 @@ if (is_array($config['gres']['gre']) && count($config['gres']['gre'])) {
}
}
/* add GRE interfaces */
/* add LAGG interfaces */
if (is_array($config['laggs']['lagg']) && count($config['laggs']['lagg'])) {
foreach ($config['laggs']['lagg'] as $lagg) {
$portlist[$lagg['laggif']] = $lagg;
$portlist[$lagg['laggif']]['islagg'] = true;
/* LAGG members cannot be assigned */
$lagifs = explode(',', $lagg['members']);
foreach ($lagifs as $lagif)
if (isset($portlist[$lagif]))
unset($portlist[$lagif]);
}
}