Subversion Repositories ALCASAR

Rev

Rev 1299 | Rev 1818 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
872 richard 1
#!/bin/sh
2
 
3
# alcasar-conup.sh
4
# by Rexy
5
# This script is distributed under the Gnu General Public License (GPL)
6
 
7
# This script is launched after each successfull login
8
# Ce script est lancé à chaque connexion d'usager (authentification réussi)
9
 
10
# Debug : show all the coova parse variables. There are declared in /src/chilli.c
1294 richard 11
#echo "parse coova variables" > /tmp/debug-conup.txt
12
#for i in LAYER3 DEV NET MASK ADDR USER_NAME NAS_IP_ADDRESS SERVICE_TYPE FRAMED_IP_ADDRESS FILTER_ID STATE CLASS CUI SESSION_TIMEOUT IDLE_TIMEOUT CALLING_STATION_ID CALLED_STATION_ID NAS_ID NAS_PORT_TYPE ACCT_SESSION_ID ACCT_INTERIM_INTERVAL WISPR_LOCATION_ID WISPR_LOCATION_NAME WISPR_BANDWIDTH_MAX_UP WISPR_BANDWIDTH_MAX_DOWN WISPR-SESSION_TERMINATE_TIME CHILLISPOT_MAX_INPUT_OCTETS CHILLISPOT_MAX_OUTPUT_OCTETS CHILLISPOT_MAX_TOTAL_OCTETS INPUT_OCTETS OUTPUT_OCTETS SESSION_TIME IDLE_TIME LOCATION OLD_LOCATION TERMINATE_CAUSE
13
#do
14
#	echo "$i : ${!i}" >> /tmp/debug-conup.txt
15
#done
16
 
1364 richard 17
# Add user to the SET (function of his filtering level)
18
case $FILTER_ID in
19
	# HAVP
20
	"00000001")
21
		set="havp_set"
22
		;;
23
	# HAVP + Blacklist
24
	"00000011")
25
		set="havp_bl_set"
26
		;;
27
	# HAVP + Whitelist
28
	"00000101")
29
		set="havp_wl_set"
30
		;;
31
	# No filtering
32
	*)
33
		set="no_filtering_set"
34
		;;
35
esac
36
ipset add $set $FRAMED_IP_ADDRESS