]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Allow also ip/netmask for blue access.
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 24 Jun 2010 11:14:05 +0000 (13:14 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 24 Jun 2010 11:14:05 +0000 (13:14 +0200)
config/rootfiles/core/38/filelists/files
html/cgi-bin/wireless.cgi
src/misc-progs/wirelessctrl.c

index 1dccfbcfe7da3f979f0fc66990df46be9c9106d0..ee03488efb75abb4bbf6358c0ea593a58a5f4a3e 100644 (file)
@@ -39,6 +39,7 @@ srv/web/ipfire/cgi-bin/time.cgi
 srv/web/ipfire/cgi-bin/updatexlrator.cgi
 srv/web/ipfire/cgi-bin/urlfilter.cgi
 srv/web/ipfire/cgi-bin/vpnmain.cgi
+srv/web/ipfire/cgi-bin/wireless.cgi
 srv/web/ipfire/html/themes/ipfire/include/functions.pl
 srv/web/ipfire/html/themes/maniac/include/functions.pl
 var/ipfire/langs/de.pl
index a1dcf719862003b8a930edcf639ca287abc9f9b2..ecff1796b97967f97c8574d5507f2e52a9e9aac0 100644 (file)
@@ -92,7 +92,7 @@ if ($cgiparams{'ACTION'} eq 'add')
        {
                $cgiparams{'SOURCE_IP'} = 'NONE';
        } else {
-               unless(&General::validip($cgiparams{'SOURCE_IP'})) 
+               unless(&General::validipormask($cgiparams{'SOURCE_IP'})) 
                {
                        $errormessage = $Lang::tr{'invalid fixed ip address'}; 
                        goto ADDERROR;
index fbcf90e018f2cd7abfae4782521a74eed6622bfa..12b954baa3f8509ae088fa7990694fd2f2f6dc63 100644 (file)
@@ -151,7 +151,7 @@ int main(void)
 
                                                        /* both specified, added security */
                                                        if ((strlen(macaddress) == 17) &&
-                                                                       (VALID_IP(ipaddress))) {
+                                                                       (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);
                                                                        safe_system(command);
                                                                        snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -m mac --mac-source %s -s %s -i %s ! -o %s -j ACCEPT", macaddress, ipaddress, blue_dev, green_dev);
@@ -170,7 +170,7 @@ int main(void)
                                                                                                        safe_system(command);
                                                                        }
 
-                                                                       if (VALID_IP(ipaddress)) {
+                                                                       if (VALID_IP_AND_MASK(ipaddress)) {
                                                                                                        snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -s %s -i %s -j ACCEPT", ipaddress, blue_dev);
                                                                                                        safe_system(command);
                                                                                                        snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -s %s -i %s ! -o %s -j ACCEPT", ipaddress, blue_dev, green_dev);