From d4a653494c48caaf6239cb6b76389c90d60e1f3a Mon Sep 17 00:00:00 2001 From: Philippe April Date: Fri, 9 Sep 2005 03:30:32 +0000 Subject: [PATCH] * Added compile instructions and installation for OpenWrt Whiterussian-rc2 * Released 1.1.2 --- ChangeLog | 3 +++ NEWS | 14 ++++++++++++++ README.openwrt | 33 +++++++++++++++++++++++++++++++++ configure.in | 2 +- scripts/init.d/wifidog | 36 ++++++++++++++++++++++++++++++++++++ 5 files changed, 87 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3c500858..3721cdb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ # $Header$ +2005-05-23 Philippe April + * Added compile instructions and installation for OpenWrt Whiterussian-rc2 + * Released 1.1.2 2005-05-24 Mina Naguib * wdctl.c: Minor bugfix pointed out by David Vincelli: When an invalid diff --git a/NEWS b/NEWS index 4f3fee6f..ce31c2a9 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,17 @@ +WiFiDog 1.1.2: + - Added some informations so it compiles on newer OpenWRT's (whiterussian-rc2) + - Fixed minor issue with wdctl + - Changed the iptables rules priority to allow existing NAT rules to work + - read()s from central server in auth_server_request() are + now timed-out (via select). This is hopefully a bugfix to the + thread-freezing problem. + - Bugfix non-RFC compliant HTTP requests using \n instead of \r\n as line + terminations as per email from ludocornut@users.sourceforge.net + - Firewall: make the default ruleset for validating users = allow all + (except sending SMTP) + +Fixed issue with FAQ + WiFiDog 1.1.1: - An auth server on port 80 will now work - Added an FAQ diff --git a/README.openwrt b/README.openwrt index 92eb9828..a3c5b42b 100644 --- a/README.openwrt +++ b/README.openwrt @@ -2,6 +2,39 @@ $Header$ OpenWRT specific README +Since the newest OpenWRT releases, we will be able to release +binary IPKGs that should work on all the OpenWRT installations. + +The binaries are available at sourceforge. + +The older instructions are now outdated, but they are still at the bottom. + +Because they now release the images and an SDK, you can also compile +WiFiDog for the images they distribute if the current IPKG we distribute is +not up-to-date enough for you. + +To do so, download the SDK named: OpenWrt-SDK-Linux..... from OpenWRT, +then unpack the OpenWrt-SDK-WiFiDog tarball into the "package" directory of +OpenWrt-SDK, to have the files in a layout similar to this: + +OpenWrt-SDK-Linux-i686-1/package/ +OpenWrt-SDK-Linux-i686-1/package/depend.mk +OpenWrt-SDK-Linux-i686-1/package/rules.mk +OpenWrt-SDK-Linux-i686-1/package/wifidog +OpenWrt-SDK-Linux-i686-1/package/wifidog/Config.in +OpenWrt-SDK-Linux-i686-1/package/wifidog/Makefile +OpenWrt-SDK-Linux-i686-1/package/wifidog/ipkg +OpenWrt-SDK-Linux-i686-1/package/wifidog/ipkg/wifidog.control +OpenWrt-SDK-Linux-i686-1/package/wifidog/ipkg/wifidog.init +OpenWrt-SDK-Linux-i686-1/package/wifidog/ipkg/wifidog.conffiles + +Then, simply run make at the root of OpenWrt-SDK-Linux-i686-1. + +You should end up with an IPKG file in OpenWrt-SDK-Linux-i686-1/bin/packages/ +if everything went well. + +---- OLDER INSTRUCTIONS ---- + In order to compile OpenWRT for the linksys WRT54G, you must first obtain and install the OpenWRT build environement from the OpenWRT project: http://openwrt.ksilebo.net/ diff --git a/configure.in b/configure.in index dd4fb400..b4cfb48a 100644 --- a/configure.in +++ b/configure.in @@ -20,7 +20,7 @@ AC_SUBST(BUILDROOT) WIFIDOG_MAJOR_VERSION=1 WIFIDOG_MINOR_VERSION=1 -WIFIDOG_MICRO_VERSION=2_pre1 +WIFIDOG_MICRO_VERSION=2 WIFIDOG_VERSION=$WIFIDOG_MAJOR_VERSION.$WIFIDOG_MINOR_VERSION.$WIFIDOG_MICRO_VERSION AC_SUBST(WIFIDOG_MAJOR_VERSION) diff --git a/scripts/init.d/wifidog b/scripts/init.d/wifidog index ef3cb5fe..008ee5df 100644 --- a/scripts/init.d/wifidog +++ b/scripts/init.d/wifidog @@ -82,6 +82,17 @@ case "$1" in fi } + ### Test ipt_REDIRECT with iptables + test_ipt_REDIRECT () { + IPTABLES_OK=$($IPT -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 2060 2>&1 | grep "No chain.target.match") + if [ -z "$IPTABLES_OK" ]; then + $IPT -t nat -D PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 2060 2>&1 + echo 1 + else + echo 0 + fi + } + ### Find a module on disk module_exists () { echo " Looking for a module on disk" @@ -152,6 +163,31 @@ case "$1" in else echo " ipt_mark module is working" fi + + echo " Testing ipt_REDIRECT" + TEST_IPT_MAC=$(test_ipt_REDIRECT) + if [ "$TEST_IPT_MAC" = "0" ]; then + echo " iptables is not working with ipt_REDIRECT" + echo " Scanning disk for ipt_REDIRECT module" + TEST_IPT_MAC_MODULE_EXISTS=$(module_exists "ipt_REDIRECT") + if [ "$TEST_IPT_MAC_MODULE_EXISTS" = "0" ]; then + echo " ipt_REDIRECT module is missing, please install it (kernel or module)" + exit + else + echo " ipt_REDIRECT module exists, trying to load" + insmod ipt_REDIRECT > /dev/null + TEST_IPT_MAC_MODULE_MEMORY=$(module_in_memory "ipt_REDIRECT") + if [ "$TEST_IPT_MAC_MODULE_MEMORY" = "0" ]; then + echo " Error: ipt_REDIRECT not loaded" + exit + else + echo " ipt_REDIRECT loaded sucessfully" + fi + fi + else + echo " ipt_REDIRECT module is working" + fi + ;; *)