X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-splash%2Froot%2Fusr%2Fsbin%2Fluci-splash;h=34b2e9c420f4b56b0ceaac9a8f2c4b7c39832bc1;hp=bf32d635e8d33ea84e5159e12d129fdfb7800d5e;hb=2a366f4c554d46a33f727bc04e4d7a7798e5be3b;hpb=49fc87429ff313ef37a9473147ddd8cf97d74d08 diff --git a/applications/luci-splash/root/usr/sbin/luci-splash b/applications/luci-splash/root/usr/sbin/luci-splash index bf32d635e..34b2e9c42 100755 --- a/applications/luci-splash/root/usr/sbin/luci-splash +++ b/applications/luci-splash/root/usr/sbin/luci-splash @@ -304,9 +304,11 @@ end -- Add an iptables rule function add_lease_rule(mac, ipaddr) - if limit_up > 0 and limit_down > 0 then - os.execute("iptables -t mangle -I luci_splash_mark_out -m mac --mac-source %q -j MARK --set-mark 79" % mac) - os.execute("iptables -t mangle -I luci_splash_mark_in -d %q -j MARK --set-mark 80" % ipaddr) + os.execute("iptables -t mangle -I luci_splash_mark_out -m mac --mac-source %q -j MARK --set-mark 79" % mac) + os.execute("iptables -t mangle -I luci_splash_mark_in -d %q -j MARK --set-mark 80" % ipaddr) + if has_ipv6 then + os.execute("ip6tables -t mangle -I luci_splash_mark_out -m mac --mac-source %q -j MARK --set-mark 79" % mac) + os.execute("ip6tables -t mangle -I luci_splash_mark_in -d %q -j MARK --set-mark 80" % ipaddr) end