wireless: fix channel check
authorFelix Fietkau <nbd@openwrt.org>
Sat, 30 Nov 2013 18:44:14 +0000 (19:44 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 30 Nov 2013 18:44:14 +0000 (19:44 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
scripts/netifd-wireless.sh

index 67ba38b3f888f80fb87bab1e13ba325580655b0f..a67e350d0c0ad5b49b6159d02fe3675ef5b2d005 100644 (file)
@@ -46,11 +46,11 @@ _wdev_prepare_channel() {
        hwmode_n="${hwmode##n}"
 
        case "$channel" in
-               0|auto)
+               ""|0|auto)
                        channel=0
                        auto_channel=1
                ;;
-               [0-9]+) ;;
+               [0-9]*) ;;
                *)
                        wireless_setup_failed "INVALID_CHANNEL"
                ;;