summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-06-04 11:42:02 +0000
committerErmal Luçi <eri@pfsense.org>2009-06-04 11:42:02 +0000
commit39fbee97c86d4bf9e4fc47d62bac85720402f83f (patch)
tree24239b6cf0c67809541c2e70a5975b73135daea0
parentf0c3eea0f6cdc31525d5997f3175b57376cd5f07 (diff)
downloadpfsense-39fbee97c86d4bf9e4fc47d62bac85720402f83f.zip
pfsense-39fbee97c86d4bf9e4fc47d62bac85720402f83f.tar.gz
Fix lagg interfaces creation. Reported-by: http://forum.pfsense.org/index.php/topic,16734.0.html
-rw-r--r--etc/inc/interfaces.inc17
-rw-r--r--usr/local/www/interfaces_lagg_edit.php1
2 files changed, 8 insertions, 10 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index a5883a4..37f03de 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -527,8 +527,8 @@ function interface_lagg_configure(&$lagg) {
/* Calculate smaller mtu and enforce it */
$smallermtu = 0;
foreach ($members as $member) {
- $realif = get_real_interface($member);
- $mtu = get_interface_mtu($realif);
+ //$realif = get_real_interface($member);
+ $mtu = get_interface_mtu($member);
if ($smallermtu == 0 && !empty($mtu))
$smallermtu = $mtu;
else if (!empty($mtu) && $mtu < $smallermtu)
@@ -542,17 +542,14 @@ function interface_lagg_configure(&$lagg) {
foreach ($members as $member) {
if (!array_key_exists($member, $checklist))
continue;
- $realif = get_real_interface($member);
+ //$realif = get_real_interface($member);
/* make sure the parent interface is up */
- mwexec("/sbin/ifconfig {$realif} mtu {$smallermtu}");
- if($realif)
- interfaces_bring_up($realif);
- else
- log_error("could not bring realif up -- foreach(memebers)");
- mwexec("/sbin/ifconfig {laggif} laggport {$realif}");
+ mwexec("/sbin/ifconfig {$member} mtu {$smallermtu}");
+ interfaces_bring_up($member);
+ mwexec("/sbin/ifconfig {laggif} laggport {$member}");
}
- mwexec("/sbin/ifconfig {$laggif} {$lagg['proto']}");
+ mwexec("/sbin/ifconfig {$laggif} laggproto {$lagg['proto']}");
interfaces_bring_up($laggif);
diff --git a/usr/local/www/interfaces_lagg_edit.php b/usr/local/www/interfaces_lagg_edit.php
index c73676e..f3a5567 100644
--- a/usr/local/www/interfaces_lagg_edit.php
+++ b/usr/local/www/interfaces_lagg_edit.php
@@ -75,6 +75,7 @@ if ($_POST) {
$lagg['members'] = implode(',', $_POST['members']);
$lagg['descr'] = $_POST['descr'];
$lagg['laggif'] = $_POST['laggif'];
+ $lagg['proto'] = $_POST['proto'];
$lagg['laggif'] = interface_lagg_configure($lagg);
if ($lagg['laggif'] == "" || !stristr($lagg['laggif'], "lagg"))
OpenPOWER on IntegriCloud