do not limit bridge interfaces to 100

This commit is contained in:
oblique 2014-09-20 22:55:31 +03:00
parent 757c3d2c1f
commit 408e25b732

View File

@ -189,11 +189,13 @@ get_macaddr() {
} }
get_avail_bridge() { get_avail_bridge() {
for i in {0..100}; do i=0
if ! is_bridge_interface "br${i}"; then while :; do
echo "br${i}" if ! is_interface br${i}; then
echo br${i}
return return
fi fi
i=$((i + 1))
done done
} }
@ -652,11 +654,6 @@ if [[ "$SHARE_METHOD" == "bridge" ]]; then
else else
BRIDGE_IFACE=$(get_avail_bridge) BRIDGE_IFACE=$(get_avail_bridge)
fi fi
if [[ -z $BRIDGE_IFACE ]]; then
echo "ERROR: No availabe bridges < br100" >&2
exit 1
fi
elif [[ "$SHARE_METHOD" == "nat" ]]; then elif [[ "$SHARE_METHOD" == "nat" ]]; then
OLD_IP_FORWARD=$(cat /proc/sys/net/ipv4/ip_forward) OLD_IP_FORWARD=$(cat /proc/sys/net/ipv4/ip_forward)
fi fi