From 91480957ef8512171d236d969172ddde7d4a5088 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Wed, 7 Feb 2007 04:21:11 +0000 Subject: [PATCH] - on: sanity check exempt rates --- python/bwlimit.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/bwlimit.py b/python/bwlimit.py index 5c1716e..8fb6159 100644 --- a/python/bwlimit.py +++ b/python/bwlimit.py @@ -46,7 +46,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: bwlimit.py,v 1.13 2006/11/27 22:32:59 mlhuang Exp $ +# $Id: bwlimit.py,v 1.14 2006/12/13 21:48:14 faiyaza Exp $ # import sys, os, re, getopt @@ -516,8 +516,12 @@ def on(xid, dev = dev, share = None, minrate = None, maxrate = None, minexemptra minrate = bwmin if minrate > maxrate: minrate = maxrate + if maxexemptrate < bwmin: + maxexemptrate = bwmin if maxexemptrate > bwmax: maxexemptrate = bwmax + if minexemptrate < bwmin: + minexemptrate = bwmin if minexemptrate > maxexemptrate: minexemptrate = maxexemptrate -- 2.43.0