Fix UDP iperf.
This commit is contained in:
+4
-2
@@ -768,8 +768,10 @@ class Mininet( object ):
|
|||||||
server.IP() + ' ' + bwArgs )
|
server.IP() + ' ' + bwArgs )
|
||||||
debug( 'Client output: %s\n' % cliout )
|
debug( 'Client output: %s\n' % cliout )
|
||||||
servout = ''
|
servout = ''
|
||||||
# We need the second *b/sec from the iperf server output
|
# We want the last *b/sec from the iperf server output
|
||||||
while len( re.findall( '/sec', servout ) ) < 2:
|
# for TCP, there are two fo them because of waitListening
|
||||||
|
count = 2 if l4Type == 'TCP' else 1
|
||||||
|
while len( re.findall( '/sec', servout ) ) < count:
|
||||||
servout += server.monitor( timeoutms=5000 )
|
servout += server.monitor( timeoutms=5000 )
|
||||||
server.sendInt()
|
server.sendInt()
|
||||||
server.waitOutput()
|
server.waitOutput()
|
||||||
|
|||||||
Reference in New Issue
Block a user