From: Jo-Philipp Wich Date: Fri, 20 Feb 2009 04:17:57 +0000 (+0000) Subject: Merge r4060, r4061 X-Git-Tag: 0.8.7~88 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2c34f6d366478fa1e1913bd0f2c92e70dd2ff8ed;p=project%2Fluci.git Merge r4060, r4061 --- diff --git a/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua b/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua index 23bbfecf89..84e401af95 100644 --- a/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua +++ b/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua @@ -392,10 +392,10 @@ function client.write(self, section, value) -- Delete old splash - uci:delete_all("luci_splash", "iface", {net=device, zone="freifunk"}) + uci:delete_all("luci_splash", "iface", {network=device.."dhcp", zone="freifunk"}) -- Register splash - uci:section("luci_splash", "iface", nil, {net=device, zone="freifunk"}) + uci:section("luci_splash", "iface", nil, {network=device.."dhcp", zone="freifunk"}) uci:save("luci_splash") end diff --git a/applications/luci-splash/root/etc/init.d/luci_splash b/applications/luci-splash/root/etc/init.d/luci_splash index fe451d08d5..ad47a25909 100755 --- a/applications/luci-splash/root/etc/init.d/luci_splash +++ b/applications/luci-splash/root/etc/init.d/luci_splash @@ -25,6 +25,12 @@ iface_add() { iptables -t nat -A luci_splash_prerouting -s "$NETWORK/$PREFIX" -d "$ipaddr" -p tcp -m multiport ! --dport 22,80,443 -j luci_splash_portal } +iface_del() { + config_get zone "$1" zone + [ -n "$zone" ] || return 0 + while iptables -t nat -D prerouting_${zone} -j luci_splash_prerouting 2>&-; do :; done +} + blacklist_add() { local cfg="$1" @@ -39,6 +45,11 @@ whitelist_add() { [ -n "$mac" ] && iptables -t nat -I luci_splash_leases -m mac --mac-source "$mac" -j RETURN } +boot() { + ### We are started by the firewall include + exit 0 +} + start() { ### Read chains from config include /lib/network @@ -75,12 +86,6 @@ start() { start-stop-daemon -S -m -p /var/run/luci-splashd.pid -b -q -x /usr/bin/luci-splashd } -iface_del() { - config_get zone "$1" zone - [ -n "$zone" ] || return 0 - while iptables -t nat -D prerouting_${zone} -j luci_splash_prerouting 2>&-; do :; done -} - stop() { ### Clear interface rules config_load luci_splash