classes_p2p_maj se lance avec generate
+ esthtique darcs-hash:20060424212752-72cb0-ef1c66da01c8b84042fef332b3033beb0f737b36.gz
This commit is contained in:
parent
a44f1d77ff
commit
af0714d7d3
1 changed files with 7 additions and 7 deletions
|
@ -209,7 +209,7 @@ class firewall_crans :
|
|||
cprint(u"\t -> fin de la procédure d'arrêt",'vert')
|
||||
|
||||
def __stop(self) :
|
||||
self.anim = anim("\tSuppression regles")
|
||||
self.anim = anim("\tSuppression des règles")
|
||||
iptables("-t nat -P PREROUTING ACCEPT")
|
||||
iptables("-F")
|
||||
iptables("-t nat -F")
|
||||
|
@ -509,7 +509,7 @@ class firewall_komaz(firewall_crans) :
|
|||
# On calcule le débit garanti pour un adhérent
|
||||
debit_adh = p2p.debit_max/(len(adherents)+1)
|
||||
|
||||
a = anim('\tGénération des classes de filtrage p2p', len(adherents))
|
||||
self.anim = anim('\tGénération des classes de filtrage p2p', len(adherents))
|
||||
warn = ''
|
||||
# Création des classes et qdisc
|
||||
for interface in [self.eth_ext, self.eth_int] :
|
||||
|
@ -526,7 +526,7 @@ class firewall_komaz(firewall_crans) :
|
|||
tc("qdisc add dev %s parent 1:9998 handle 9999: sfq perturb 10" % interface)
|
||||
# On construit ensuite les classes et qdisc pour chaque adhérent
|
||||
for adherent in adherents :
|
||||
a.cycle()
|
||||
self.anim.cycle()
|
||||
class_id = int(adherent.id())+1 # On ne peut pas reprendre le numéro 1
|
||||
qdisc_id = class_id+5000 # Il nous faut un n° inférieur à 9998 unique
|
||||
for interface in [self.eth_ext, self.eth_int] :
|
||||
|
@ -546,8 +546,8 @@ class firewall_komaz(firewall_crans) :
|
|||
"--mark %s -j CLASSIFY --set-class 1:9998" % conf_fw.mark['bittorrent'])
|
||||
iptables("-t mangle -A POSTROUTING -o ens -m mark " +
|
||||
"--mark %s -j CLASSIFY --set-class 1:9998" % conf_fw.mark['bittorrent'])
|
||||
|
||||
print "\n"
|
||||
self.anim.reinit()
|
||||
print OK
|
||||
|
||||
def nat_table(self) :
|
||||
self.anim = anim('\tStructure de la table nat')
|
||||
|
@ -1088,7 +1088,7 @@ if __name__ == '__main__' :
|
|||
fw = eval('firewall_%s()' % hostname)
|
||||
chaines = []
|
||||
for nom in dir(fw) :
|
||||
if nom in [ 'log_chaines' , 'test_virus_flood', 'reseaux_non_routables', 'test_mac_ip' , 'blacklist' , 'ext_vers_serveurs' , 'serveurs_vers_ext', 'ext_vers_crans', 'crans_vers_ext' , 'filtre_p2p', 'admin_vlan' , 'serv_out_adm', 'mangle_table', 'classes_p2p_maj'] :
|
||||
if nom in [ 'log_chaines' , 'test_virus_flood', 'reseaux_non_routables', 'test_mac_ip' , 'blacklist' , 'ext_vers_serveurs' , 'serveurs_vers_ext', 'ext_vers_crans', 'crans_vers_ext' , 'filtre_p2p', 'admin_vlan' , 'serv_out_adm', 'mangle_table' ] :
|
||||
chaines.append(nom)
|
||||
|
||||
def __usage(txt=None) :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue