From: Michael Tremer Date: Mon, 31 Oct 2011 19:34:09 +0000 (+0000) Subject: bonding: Fix setting mode. X-Git-Tag: 003~3 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b8c614b246e7cd1c7b840e59db6cff47227ae5f8;p=network.git bonding: Fix setting mode. The mode cannot be changed after the device is set up. So we set the mode prior to bringing the device up. --- diff --git a/functions.bonding b/functions.bonding index 74a4d09d..ff2841d4 100644 --- a/functions.bonding +++ b/functions.bonding @@ -39,7 +39,6 @@ function bonding_create() { echo "+${device}" > /sys/class/net/bonding_masters device_set_address ${device} ${mac} - device_set_up ${device} } function bonding_remove() { diff --git a/hooks/ports/bonding b/hooks/ports/bonding index 0a8535f6..880d987e 100755 --- a/hooks/ports/bonding +++ b/hooks/ports/bonding @@ -110,12 +110,14 @@ function _up() { fi bonding_create ${device} ${DEVICE_MAC} + assert device_exists ${device} if [ -n "${MODE}" ]; then bonding_set_mode ${device} ${MODE} fi bonding_set_miimon ${device} ${MIIMON} + device_set_up ${device} local slave for slave in ${SLAVES}; do