]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/misc-progs/wirelessctrl.c
wirelessctrl: fix blue access "enabled" checkbox.
[people/teissler/ipfire-2.x.git] / src / misc-progs / wirelessctrl.c
index 1f1b0f861e6a75913243938dd59482ee6328249e..8ca7a81ae77572aac6a522629857bb08203f1a1a 100644 (file)
@@ -130,7 +130,7 @@ int main(void) {
                macaddress = strtok(NULL, ",");
                enabled = strtok(NULL, ",");
 
-               if (strncmp(enabled, "on", 2) != 0) {
+               if (strcmp(enabled, "on") == 0) {
                        /* both specified, added security */
                        if ((strlen(macaddress) == 17) && (VALID_IP_AND_MASK(ipaddress))) {
                                snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -m mac --mac-source %s -s %s -i %s -j ACCEPT", macaddress, ipaddress, blue_dev);