# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: bwlimit.py,v 1.12 2006/04/24 20:04:13 mlhuang Exp $
+# $Id: bwlimit.py,v 1.14 2006/12/13 21:48:14 faiyaza Exp $
#
import sys, os, re, getopt
maxexemptrate = get_tc_rate(maxexemptrate)
# Sanity checks
+ if maxrate < bwmin:
+ maxrate = bwmin
if maxrate > bwcap:
maxrate = bwcap
+ if minrate < bwmin:
+ 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