]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
fixed wirelesscontrol and included in core 8
authormaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 19 Feb 2008 20:09:19 +0000 (20:09 +0000)
committermaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 19 Feb 2008 20:09:19 +0000 (20:09 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1223 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

config/rootfiles/common/ntfs-3g
config/rootfiles/core/8/files
config/rootfiles/core/8/update.sh
src/misc-progs/wirelessctrl.c

index b8f85cd25f220ac84fe0f1f387ca0988a939004e..d51d88019edc9c41e38205ce405149147ac62539 100644 (file)
@@ -2,8 +2,8 @@ bin/ntfs-3g
 #lib/libntfs-3g.a
 #lib/libntfs-3g.la
 lib/libntfs-3g.so
-lib/libntfs-3g.so.21
-lib/libntfs-3g.so.21.0.0
+lib/libntfs-3g.so.23
+lib/libntfs-3g.so.23.0.0
 sbin/mount.ntfs-3g
 #usr/include/ntfs-3g
 #usr/include/ntfs-3g/attrib.h
index f0753cb43060451fb7d4a3c51b71b7b166a7cb32..989570be02cff4f119126fd9885f900e03918f09 100644 (file)
@@ -4,3 +4,4 @@ lib/modules/2.6.16.57-ipfire-smp/kernel/drivers/net/r8169.ko
 lib/modules/2.6.16.57-ipfire-smp/kernel/drivers/net/r8168.ko
 srv/web/ipfire/cgi-bin/logs.cgi/log.dat
 etc/ntp
+usr/local/bin/wirelessctrl
index 996249fa7ac827148cf005dc4d28fb116672ed4b..2e88c6ce9a171eac82367138882a2e614f7b9708 100644 (file)
@@ -2,3 +2,5 @@
 . /opt/pakfire/lib/functions.sh
 extract_files
 depmod -a
+echo "DROPWIRELESSFORWARD=on" >> /var/ipfire/optionsfw/settings
+echo "DROPWIRELESSINPUT=on" >> /var/ipfire/optionsfw/settings
index 321addf9052512b975556cef04c3826741261853..cfc61928324bda8a619e7a0d3be97a4cddd15b67 100644 (file)
@@ -25,30 +25,6 @@ FILE *fd = NULL;
 char blue_dev[STRING_SIZE] = "";
 char command[STRING_SIZE];
 
-void exithandler(void)
-{
-  struct keyvalue *kv = NULL;
-  char buffer[STRING_SIZE];
-       if(strlen(blue_dev))
-       {
-        if(findkey(kv, "DROPWIRELESSINPUT", buffer) && !strcmp(buffer,"on")){
-               snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -j LOG --log-prefix 'DROP_Wirelessinput'", blue_dev);
-               safe_system(command);
-               }
-        if(findkey(kv, "DROPWIRELESSFORWARD", buffer) && !strcmp(buffer,"on")){
-               snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -i %s -j LOG --log-prefix 'DROP_Wirelessforward'", blue_dev);
-               safe_system(command);
-               }
-               snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -j DROP -m comment --comment 'DROP_Wirelessinput'", blue_dev);
-               safe_system(command);
-               snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -j DROP -m comment --comment 'DROP_Wirelessforward'", blue_dev);
-               safe_system(command);
-       }
-
-       if (fd)
-               fclose(fd);
-}
-
 int main(void)
 {
        char green_dev[STRING_SIZE] = "";
@@ -110,8 +86,24 @@ int main(void)
                exit(0);
        }
 
-       /* register exit handler to ensure the block rule is always present */
-       atexit(exithandler);
+       if(strlen(blue_dev))
+       {
+        if(findkey(kv, "DROPWIRELESSINPUT", buffer) && !strcmp(buffer,"on")){
+               snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -j LOG --log-prefix 'DROP_Wirelessinput'", blue_dev);
+               safe_system(command);
+               }
+        if(findkey(kv, "DROPWIRELESSFORWARD", buffer) && !strcmp(buffer,"on")){
+               snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -i %s -j LOG --log-prefix 'DROP_Wirelessforward'", blue_dev);
+               safe_system(command);
+               }
+               snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -j DROP -m comment --comment 'DROP_Wirelessinput'", blue_dev);
+               safe_system(command);
+               snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -i %s -j DROP -m comment --comment 'DROP_Wirelessforward'", blue_dev);
+               safe_system(command);
+       }
+
+       if (fd)
+               fclose(fd);
 
        if (!(fd = fopen(CONFIG_ROOT "/wireless/config", "r")))
        {