]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
misc-progs: Cleanup chain creation of wirelessctrl.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 23 Apr 2010 12:18:01 +0000 (14:18 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 23 Apr 2010 12:18:01 +0000 (14:18 +0200)
This changes the behaviour of the wirelessctrl binary
that will no longer create useless rules in the WIRELESSINPUT
and WIRELESSFORWARD chains that have no use at all.

So we keep this chain empty if /var/ipfire/wireless/nodrop
is existant.

src/misc-progs/wirelessctrl.c

index 40fb67e0dc1901f85da620d9ca6320efdc61a89f..fbcf90e018f2cd7abfae4782521a74eed6622bfa 100644 (file)
@@ -101,11 +101,11 @@ int main(void)
                                                        exit(0);
                                }
 
-                               if (!(fd = fopen(CONFIG_ROOT "/wireless/nodrop", "r")))
-                               {
+                               if ((fd = fopen(CONFIG_ROOT "/wireless/nodrop", "r")))
+                                       return 0;
+
                                /* register exit handler to ensure the block rule is always present */
                                atexit(exithandler);
-                               }
 
                                if (!(fd = fopen(CONFIG_ROOT "/wireless/config", "r")))
                                {