Change the mac address of the virtual interface if another interface has the same

This commit is contained in:
oblique 2014-09-20 22:59:40 +03:00
parent 3632f29912
commit 1eb11077d3

View File

@ -714,7 +714,9 @@ if [[ $NO_VIRT -eq 0 ]]; then
die "$VIRTDIEMSG"
fi
OLD_MACADDR=$(get_macaddr ${VWIFI_IFACE})
[[ ${OLD_MACADDR} == $(get_macaddr ${WIFI_IFACE}) ]] && NEW_MACADDR=$(get_new_macaddr ${VWIFI_IFACE})
if [[ $(get_all_macaddrs | grep -c ${OLD_MACADDR}) -ne 1 ]]; then
NEW_MACADDR=$(get_new_macaddr ${VWIFI_IFACE})
fi
WIFI_IFACE=${VWIFI_IFACE}
fi