mininet/mininet — pull request #198 by rad1dlp (2013-08-26 20:14:44+00:00)
Title: Fixes to issues related to unreachable hosts with iperf  

when user on mininet console issues a command : iperf h1 h2;
and when one of the host is not reachable from the other , console will hang or continue to print " waiting for server to be ready message". Fix involves 2 changes. Replace "while loop" with "if block" of code. Replace telnet mechanism with netcat mechanism. (which reduces the unnecessary 1 minute wait of telnet to few secs).

Fix has been tested under following conditions :
1. mininet topos : minimal, tree(depth=3,fanout=4 with 64 hosts), linear(16 hosts)
2. iperf between different reachable and unreachable hosts
3. made sure pingall and pingpair is not broken.

## How to reproduce the issue in the current image
sudo mn --topo minimal

mininet> iperf h1 h2
*** Iperf: testing TCP bandwidth between h1 and h2
*** Results: ['760 Mbits/sec', '761 Mbits/sec']
mininet> iperf h2 h1
*** Iperf: testing TCP bandwidth between h2 and h1
*** Results: ['735 Mbits/sec', '736 Mbits/sec']
mininet> iperf s1 h1
*** Iperf: testing TCP bandwidth between s1 and h1 ###console kind of hangs
^C
Interrupt
^C
Interrupt
^C
Interrupt
^C
Interrupt
^C
Interrupt
^C
Interrupt
^C
Interrupt
waiting for iperf to start up...waiting for iperf to start up...

waiting for iperf to start up...waiting for iperf to start up...waiting for iperf to start up..