Skip to content

Commit

Permalink
* Documented #537
Browse files Browse the repository at this point in the history
* Fixed #472, patch by Jean-Philippe Menil
* Fixed #515, using the gateway interface instead of the gateway id in the iptables chain
  • Loading branch information
tahini committed Sep 18, 2009
1 parent 0d5586a commit 2778d9b
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 7 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# $Id$

2009-09-17 Geneviève Bastien <[email protected]>
* Documented #537
* Fixed #472, patch by Jean-Philippe Menil
* Fixed #515, using the gateway interface instead of the gateway id in the iptables chain

2009-07-02 Benoit Grégoire <[email protected]>
* Re-fix #505, #525 and fix #584, sorry about that.

Expand Down
3 changes: 2 additions & 1 deletion contrib/build-openwrt-kamikazeipk/wifidog/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=wifidog
PKG_VERSION:=1.1.5
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= @SF/$(PKG_NAME)
Expand Down Expand Up @@ -54,6 +54,7 @@ define Package/wifidog/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) $(PKG_BUILD_DIR)/wifidog.conf $(1)/etc/
$(INSTALL_CONF) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/wifidog
endef
Expand Down
8 changes: 7 additions & 1 deletion contrib/build-openwrt-kamikazeipk/wifidog/files/wifidog.init
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=50
START=65
EXTRA_COMMANDS="status"
EXTRA_HELP=" status Print the status of the service"


start() {
/usr/bin/wifidog-init start
Expand All @@ -10,3 +13,6 @@ stop() {
/usr/bin/wifidog-init stop
}

status() {
/usr/bin/wifidog-init status
}
62 changes: 62 additions & 0 deletions contrib/build-openwrt-kamikazeipk8.09up/wifidog/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#
# Copyright (C) 2006,2008 OpenWrt.org
# Copyright (C) 2008 Technologies Coeus inc.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$

include $(TOPDIR)/rules.mk

PKG_NAME:=wifidog
PKG_VERSION:=1.1.5
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= @SF/$(PKG_NAME)
PKG_MD5SUM:=

PKG_FIXUP = libtool

include $(INCLUDE_DIR)/package.mk

define Package/wifidog
SUBMENU:=Captive Portals
SECTION:=net
CATEGORY:=Network
DEPENDS:=+kmod-ipt-extra +iptables-mod-extra +kmod-ipt-ipopt +iptables-mod-ipopt +kmod-ipt-nat +iptables-mod-nat +libpthread +kmod-ipt-nat-extra +iptables-mod-nat-extra
TITLE:=A wireless captive portal solution
URL:=http://www.wifidog.org
endef

define Package/wifidog/description
The Wifidog project is a complete and embeddable captive
portal solution for wireless community groups or individuals
who wish to open a free Hotspot while still preventing abuse
of their Internet connection.
endef

define Package/wifidog/conffiles
/etc/wifidog.conf
endef

MAKE_FLAGS += \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install

define Package/wifidog/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/init.d/wifidog $(1)/usr/bin/wifidog-init
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) $(PKG_BUILD_DIR)/wifidog.conf $(1)/etc/
$(INSTALL_CONF) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/wifidog
endef

$(eval $(call BuildPackage,wifidog))
17 changes: 17 additions & 0 deletions contrib/build-openwrt-kamikazeipk8.09up/wifidog/files/wifidog.init
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=65
EXTRA_COMMANDS="status"
EXTRA_HELP=" status Print the status of the service"

start() {
/usr/bin/wifidog-init start
}

stop() {
/usr/bin/wifidog-init stop
}

status() {
/usr/bin/wifidog-init status
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- wifidog.org/wifidog.conf 2008-03-23 16:24:48.000000000 -0400
+++ wifidog/wifidog.conf 2008-03-23 16:26:10.000000000 -0400
@@ -30,7 +30,7 @@
# Set this to the internal interface (typically your wifi interface).
# Typically br0 for OpenWrt, and eth1, wlan0, ath0, etc. otherwise

-GatewayInterface br0
+GatewayInterface br-lan

# Parameter: GatewayAddress
# Default: Find it from GatewayInterface
3 changes: 2 additions & 1 deletion contrib/build-openwrt-whiterussianipk/wifidog/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=wifidog
PKG_VERSION:=1.1.5
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_MD5SUM:=842b21e1b02d0a90677b289d794e0e21
PKG_SOURCE_URL:= @SF/$(PKG_NAME)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
Expand Down Expand Up @@ -49,6 +49,7 @@ $(IPKG_WIFIDOG):
install -m0755 -d $(IDIR_WIFIDOG)/etc/init.d
install -m0755 ./files/$(PKG_NAME).init $(IDIR_WIFIDOG)/etc/init.d/S65wifidog
install -m0644 $(PKG_BUILD_DIR)/wifidog.conf $(IDIR_WIFIDOG)/etc/
install -m0644 $(PKG_BUILD_DIR)/wifidog-msg.html $(IDIR_WIFIDOG)/etc/
install -m0755 -d $(IDIR_WIFIDOG)/usr/bin
install -m0755 -d $(IDIR_WIFIDOG)/usr/lib
install -m0755 $(PKG_BUILD_DIR)/scripts/init.d/wifidog $(IDIR_WIFIDOG)/usr/bin/wifidog-init
Expand Down
16 changes: 14 additions & 2 deletions contrib/build-openwrt-whiterussianipk/wifidog/files/wifidog.init
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
#!/bin/sh
/usr/bin/wifidog-init start
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=50

start() {
/usr/bin/wifidog-init start
}

stop() {
/usr/bin/wifidog-init stop
}

status() {
/usr/bin/wifidog-init status
}
5 changes: 3 additions & 2 deletions src/fw_iptables.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ iptables_insert_gateway_id(char **input)
memcpy(token, "%1$s", 4);

config = config_get_config();
safe_asprintf(&buffer, *input, config->gw_id);
safe_asprintf(&buffer, *input, config->gw_interface);

free(*input);
*input=buffer;
Expand Down Expand Up @@ -533,7 +533,8 @@ iptables_fw_counters_update(void)
while (('\n' != fgetc(output)) && !feof(output))
;
while (output && !(feof(output))) {
rc = fscanf(output, "%*s %llu %*s %*s %*s %*s %*s %15[0-9.] %*s %*s %*s %*s %*s 0x%*u", &counter, ip);
rc = fscanf(output, "%*s %llu %*s %*s %*s %*s %*s %15[0-9.] %*s %*s %*s %*s %*s %*s", &counter, ip);
//rc = fscanf(output, "%*s %llu %*s %*s %*s %*s %*s %15[0-9.] %*s %*s %*s %*s %*s 0x%*u", &counter, ip);
if (2 == rc && EOF != rc) {
/* Sanity*/
if (!inet_aton(ip, &tempaddr)) {
Expand Down

0 comments on commit 2778d9b

Please sign in to comment.