Fix bw limits on nodes that don't use eth0 as the default network device.
maxexemptrate = cap[5]
# Figure out what the current node bandwidth cap is
- bwcap = get_bwcap()
+ bwcap = get_bwcap(dev)
# Set defaults
if share is None:
# Defaults
numeric = False
- bwcap = get_bwcap()
+ bwcap = None
(opts, argv) = getopt.getopt(sys.argv[1:], "d:nr:q:vh")
for (opt, optval) in opts:
elif opt == '-h':
usage()
+ if not bwcap:
+ bwcap = get_bwcap(dev)
+
if bwcap == -1:
return 0