From 30b8617bd828bb96dace4a0b7024df07b661904d Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 21 Jun 2023 15:33:24 +0200 Subject: network: fix bond slave addition after recent sysfs-based changes There was a mistake in the sysfs changes to set up the bonding devices, the bond device was added to master instead of adding the slave to slaves. --- sbin/init.d/network | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/init.d/network b/sbin/init.d/network index 5edfc21..184aaf0 100755 --- a/sbin/init.d/network +++ b/sbin/init.d/network @@ -760,7 +760,8 @@ function do_start { elif [ -e "/sys/class/net/$instname/bonding/slaves" ]; then ip li set dev "$arg" down >/dev/null 2>&1 ip addr flush dev "$arg" >/dev/null 2>&1 - echo "+$instname" > /sys/class/net/bonding_masters + # will automatically set the device up again + echo "+$arg" > "/sys/class/net/$instname/bonding/slaves" else ifenslave $instname $arg >/dev/null 2>&1 ip addr flush dev $arg >/dev/null 2>&1 -- 2.35.3