create_ap

create a nat-ed wifi ap
git clone git://git.2f30.org/create_ap.git
Log | Files | Refs | LICENSE

commit 408e25b73242679ccacecd946e72d782c4b4a6e4
parent 757c3d2c1fb7234d9a6b1deb2c5ddeebe7b00abb
Author: oblique <psyberbits@gmail.com>
Date:   Sat Sep 20 22:55:31 +0300

do not limit bridge interfaces to 100

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