applications/luci-splash: do not splash non-splash clients
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 25 Jun 2009 21:25:19 +0000 (21:25 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 25 Jun 2009 21:25:19 +0000 (21:25 +0000)
applications/luci-splash/root/etc/init.d/luci_splash

index 06b4408c658510e87617c3d532dea65beffc9dc0..dd688d77c353a14d1249b42cd50a9cd492f51ded 100755 (executable)
@@ -40,6 +40,9 @@ iface_add() {
        iptables -t nat -A prerouting_${zone} -j luci_splash_prerouting
        iptables -t nat -A luci_splash_prerouting -j luci_splash_portal
 
+       iptables -t filter -I luci_splash_filter -s ! "$NETWORK/$PREFIX" -j RETURN
+       iptables -t nat    -I luci_splash_leases -s ! "$NETWORK/$PREFIX" -j RETURN
+
        iptables -t filter -I luci_splash_filter -s "$NETWORK/$PREFIX" -d "$ipaddr/${netmask:-32}" -j RETURN
        iptables -t nat    -I luci_splash_leases -s "$NETWORK/$PREFIX" -d "$ipaddr/${netmask:-32}" -j RETURN