diff options
author | egon0 <ms@resonar.de> | 2011-06-22 23:14:54 (GMT) |
---|---|---|
committer | egon0 <ms@resonar.de> | 2011-06-22 23:14:54 (GMT) |
commit | 5b0ace840e78b0151fb40a09eadeb40cdb95957e (patch) | |
tree | bc798b5ae2f76b2366fffe5bc9e49bdd652b5ac2 /files/sbin | |
parent | 5b116ea61a2614905a7c261edae4b2ab57b8bce1 (diff) |
* switched splash stuff from ip based to mac based
Diffstat (limited to 'files/sbin')
-rwxr-xr-x | files/sbin/splash_sync | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/files/sbin/splash_sync b/files/sbin/splash_sync index f54fbb4..3a2b0f1 100755 --- a/files/sbin/splash_sync +++ b/files/sbin/splash_sync @@ -7,18 +7,18 @@ myip=`uci get network.mesh.ipaddr` splash_check() { timeout=6000 current_time=`date +%s` - config_get ip "$1" ip + config_get mac "$1" mac config_get time "$1" time local config="$1" let time_check=$time+$timeout if [ $time_check -gt $current_time ]; then # User ist noch gesplashed - iptables -t nat -D ffj_splash -s $ip -j ACCEPT - iptables -t nat -I ffj_splash 1 -s $ip -j ACCEPT + iptables -t nat -D ffj_splash -m mac --mac-source $mac -j ACCEPT + iptables -t nat -I ffj_splash 1 -m mac --mac-source $mac -j ACCEPT else # User is not longer splashed / the user must click again - iptables -t nat -D ffj_splash -s $ip -j ACCEPT - uci delete splash_users.@user[$x].ip + iptables -t nat -D ffj_splash -m mac --mac-source $mac -j ACCEPT + uci delete splash_users.@user[$x].mac uci delete splash_users.@user[$x].time uci delete splash_users.@user[$x] |