From 8cc93ee11f1788332847c72afbbb2688b3206023 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 23 Apr 2010 14:18:01 +0200 Subject: [PATCH] misc-progs: Cleanup chain creation of wirelessctrl. 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/misc-progs/wirelessctrl.c b/src/misc-progs/wirelessctrl.c index 40fb67e0dc..fbcf90e018 100644 --- a/src/misc-progs/wirelessctrl.c +++ b/src/misc-progs/wirelessctrl.c @@ -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"))) { -- 2.39.2