Subversion Repositories ALCASAR

Rev

Rev 1 | Rev 40 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1 Rev 18
Line 18... Line 18...
18
		noresponse_ip=`echo $noresponse | cut -d" " -f1`
18
		noresponse_ip=`echo $noresponse | cut -d" " -f1`
19
		noresponse_mac=`echo $noresponse | cut -d" " -f2`
19
		noresponse_mac=`echo $noresponse | cut -d" " -f2`
20
		arp_reply=`/usr/sbin/arping -b -I$INTIF -s$PRIVATE_IP -c1 $noresponse_ip|grep response|cut -d" " -f2`
20
		arp_reply=`/usr/sbin/arping -b -I$INTIF -s$PRIVATE_IP -c1 $noresponse_ip|grep response|cut -d" " -f2`
21
		if [[ $(expr $arp_reply) -eq 0 ]]
21
		if [[ $(expr $arp_reply) -eq 0 ]]
22
	       	then
22
	       	then
23
			logger "alcasar-watchdog $noresponse_ip ($noresponse_mac) reste muette. On deconnecte."
23
			logger "alcasar-watchdog $noresponse_ip ($noresponse_mac) reste muette. On déconnecte."
24
			/usr/sbin/chilli_query logout $noresponse_mac
24
			/usr/sbin/chilli_query logout $noresponse_mac
25
		fi
25
		fi
26
	done
26
	done
27
	rm $tmp_file
27
	rm $tmp_file
28
fi
28
fi
Line 42... Line 42...
42
			echo "$active_ip $active_mac" >> $tmp_file
42
			echo "$active_ip $active_mac" >> $tmp_file
43
	fi
43
	fi
44
# on deconnecte l'usager d'une stations usurpée (@MAC)
44
# on deconnecte l'usager d'une stations usurpée (@MAC)
45
	if [[ $(expr $arp_reply) -gt 2 ]]
45
	if [[ $(expr $arp_reply) -gt 2 ]]
46
	       	then
46
	       	then
47
			logger "alcasar-watchdog : $active_ip est usurpée ($active_mac). On deconnecte."
47
			logger "alcasar-watchdog : $active_ip est usurpée ($active_mac). On déconnecte."
48
			/usr/sbin/chilli_query logout $active_mac
48
			/usr/sbin/chilli_query logout $active_mac
49
	fi
49
	fi
50
fi
50
fi
51
done
51
done