applications/luci-splash: Always allow clients to connect to the community homepage...
[project/luci.git] / applications / luci-splash / root / etc / init.d / luci_splash
index 3607732188a5c71ab2ee2629eb91d0360bd4fa8c..4f36252e6a207ea68bd8047280d44e8b101f499b 100755 (executable)
@@ -270,6 +270,14 @@ start() {
        config_foreach iface_add iface
        config_foreach subnet_add subnet
 
+       ### Add the community homepage to the list of allowed destination subnets
+       hp=$(uci -q get freifunk.community.homepage) && {
+               chp=${hp#http*://}
+               chp=${chp%%/*}
+               $IPT -t nat    -I luci_splash_prerouting -d "${chp}/32" -j RETURN
+               $IPT -t filter -I luci_splash_forwarding -d "${chp}/32" -j RETURN
+       }
+
        ### Find active mac addresses
        MACS=""