From 4037bdb62a547509a5b9309441c4c2be03dc8858 Mon Sep 17 00:00:00 2001 From: Olivier Huber Date: Fri, 17 Apr 2009 07:10:00 +0200 Subject: [PATCH] =?UTF-8?q?[./gestion/gen=5Fconfs/firewall.py]=20Gros=20ha?= =?UTF-8?q?ck=20pour=20faire=20marcher=20la=20g=C3=A9n=C3=A9ration=20du=20?= =?UTF-8?q?firewall=20dans=20tous=20les=20cas=20de=20figure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mince ça pourrait faire marcher le proxy transparent quand on reboote sable ... darcs-hash:20090417051000-8fbb1-c8a56da18e487a5a4afcfb1ff90257a927e09e21.gz --- gestion/gen_confs/firewall.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gestion/gen_confs/firewall.py b/gestion/gen_confs/firewall.py index 03dd1b2e..51c19bf5 100644 --- a/gestion/gen_confs/firewall.py +++ b/gestion/gen_confs/firewall.py @@ -1234,7 +1234,11 @@ class firewall_sable(firewall_rouge): iptables("-t nat -A POSTROUTING -m mark --mark %s -j MASQUERADE" % conf_fw.mark["https-radin"]) # Limite de débit sur le vlan radin - tc("qdisc del dev %s root" % if_radin) + try: + tc("qdisc del dev %s root" % if_radin) + except TcError, c: + print(str(c) + '\n') + tc("qdisc add dev %s root htb" % if_radin) tc("class add dev %s root htb rate %d ceil %d" % (if_radin, debit_max_radin, debit_max_radin))