From bf83f4f343ad5c6da9cc856be40fc844efa9fa9f Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Thu, 12 Jul 2018 01:51:16 +0000 Subject: [PATCH] Don't bother checking for negative delay/jitter It's kind of pointless. However technically the argument should be a number and not a string - it's always in ms. --- mininet/link.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mininet/link.py b/mininet/link.py index 170d022..59cb9ec 100644 --- a/mininet/link.py +++ b/mininet/link.py @@ -285,11 +285,7 @@ class TCIntf( Intf ): loss=None, max_queue_size=None ): "Internal method: return tc commands for delay and loss" cmds = [] - if delay and delay < 0: - error( 'Negative delay', delay, '\n' ) - elif jitter and jitter < 0: - error( 'Negative jitter', jitter, '\n' ) - elif loss and ( loss < 0 or loss > 100 ): + if loss and ( loss < 0 or loss > 100 ): error( 'Bad loss percentage', loss, '%%\n' ) else: # Delay/jitter/loss/max queue size