Commit 0d1befbd authored by Valentin Samir's avatar Valentin Samir
Browse files

[firewall4] La voip est du traffic prioritaire

parent 90764dba
......@@ -728,6 +728,7 @@ class firewall_komaz(firewall_base_routeur):
self.add(table, chain, '-d %s -j RETURN' % net)
self.add(table, chain, '-m set --match-set %s src -j MARK --set-mark %s'
% (self.ipset['blacklist']['soft'], config.firewall.mark['proxy']))
print OK
if table == 'filter':
......@@ -854,6 +855,10 @@ class firewall_komaz(firewall_base_routeur):
# Classification pour les blacklists upload
self.add(table, chain, '-o %s -m set --match-set %s src -j CLASSIFY --set-class 1:11' % (dev['out'], self.ipset['blacklist']['upload']))
# Classification pour la voip
self.add(table, chain, '-d sip.crans.org -j CLASSIFY --set-class 1:12')
self.add(table, chain, '-s sip.crans.org -j CLASSIFY --set-class 1:12')
print OK
if run_tc:
......@@ -875,6 +880,11 @@ class firewall_komaz(firewall_base_routeur):
tc('qdisc add dev %s parent 1:10 '
'handle 10: sfq perturb 10' % dev[int_key])
# Classe par pour la voip
tc('class add dev %s parent 1:2 classid 1:12 '
'htb rate %skbps ceil %skbps prio 0' % (dev[int_key], debit_max, debit_max))
tc('qdisc add dev %s parent 1:12 '
'handle 12: sfq perturb 10' % dev[int_key])
#Classe des decos upload
tc('class add dev %s parent 1:2 classid 1:11 '
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment