diff options
author | egon_ffj <egon@freifunk-jena.de> | 2011-06-22 23:14:54 (GMT) |
---|---|---|
committer | egon_ffj <egon@freifunk-jena.de> | 2011-06-22 23:14:54 (GMT) |
commit | e002a1adca04354dc9e5b9f8721f9fd55ff2401b (patch) | |
tree | bc798b5ae2f76b2366fffe5bc9e49bdd652b5ac2 /files/sbin/splash_sync | |
parent | fcc656eab7da3de5fca7c145b2d5162f1edaf6fe (diff) |
* switched splash stuff from ip based to mac based
Diffstat (limited to 'files/sbin/splash_sync')
-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] |