git://git.onelab.eu
/
util-vserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ce5570a
)
deprecating vnet.
author
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Wed, 14 Nov 2007 21:57:58 +0000
(21:57 +0000)
committer
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Wed, 14 Nov 2007 21:57:58 +0000
(21:57 +0000)
python/bwlimit.py
patch
|
blob
|
history
diff --git
a/python/bwlimit.py
b/python/bwlimit.py
index
6892089
..
8221e7b
100644
(file)
--- a/
python/bwlimit.py
+++ b/
python/bwlimit.py
@@
-348,11
+348,11
@@
def init(dev = dev, bwcap = bwmax):
# Set up the root class (and tell VNET what it is). Packets sent
# by root end up here and are capped at the node bandwidth
# cap.
# Set up the root class (and tell VNET what it is). Packets sent
# by root end up here and are capped at the node bandwidth
# cap.
- on(root_xid, dev, share = root_share)
- try:
- file("/proc/sys/vnet/root_class", "w").write("%d" % ((1 << 16) | default_minor | root_xid))
- except:
- pass
+
#
on(root_xid, dev, share = root_share)
+
#
try:
+
#
file("/proc/sys/vnet/root_class", "w").write("%d" % ((1 << 16) | default_minor | root_xid))
+
#
except:
+
#
pass
# Set up the default class. Packets that fail classification end
# up here.
# Set up the default class. Packets that fail classification end
# up here.
@@
-574,7
+574,7
@@
def exempt_init(group_name, node_ips):
"""
# Clean up
"""
# Clean up
- iptables = "/sbin/iptables -t
vnet
%s POSTROUTING"
+ iptables = "/sbin/iptables -t
MANGLE
%s POSTROUTING"
run(iptables % "-F")
run("/sbin/ipset -X " + group_name)
run(iptables % "-F")
run("/sbin/ipset -X " + group_name)