If we change the primary interface name, ensure we tell the bonding driver about it.

This commit is contained in:
Scott Kilau 2022-06-16 10:14:49 -05:00
parent adaa3ccf0b
commit cdc6119fac

View File

@ -93,6 +93,9 @@ rename_interface_and_setup_bonding() {
/opt/wz_mini/bin/busybox ip link set $primary_interface name wlanold /opt/wz_mini/bin/busybox ip link set $primary_interface name wlanold
/opt/wz_mini/bin/busybox ip addr flush dev wlanold /opt/wz_mini/bin/busybox ip addr flush dev wlanold
primary_interface="wlanold" primary_interface="wlanold"
# Because we just changed the name of the primary interface, we need to
# tell the bonding driver about the name change as well.
echo "$primary_interface" > /sys/devices/virtual/net/$bonding_interface/bonding/primary
fi fi
if [[ "$secondary_interface" == "wlan0" ]]; then if [[ "$secondary_interface" == "wlan0" ]]; then
/opt/wz_mini/bin/busybox ip link set $secondary_interface name wlanold /opt/wz_mini/bin/busybox ip link set $secondary_interface name wlanold