From b8c614b246e7cd1c7b840e59db6cff47227ae5f8 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 31 Oct 2011 19:34:09 +0000 Subject: [PATCH] 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. --- functions.bonding | 1 - hooks/ports/bonding | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) 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 -- 2.47.2