From 891d80713758aaabc98c721b721a9cf69702a361 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Mon, 26 Aug 2013 19:12:18 -0700 Subject: [PATCH] fixed multiping example --- examples/multiping.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/multiping.py b/examples/multiping.py index 3bd231c..88667d4 100755 --- a/examples/multiping.py +++ b/examples/multiping.py @@ -23,13 +23,8 @@ def chunks( l, n ): def startpings( host, targetips ): "Tell host to repeatedly ping targets" - targetips.append( '10.0.0.200' ) - targetips = ' '.join( targetips ) - # BL: Not sure why loopback intf isn't up! - host.cmd( 'ifconfig lo up' ) - # Simple ping loop cmd = ( 'while true; do ' ' for ip in %s; do ' % targetips + @@ -63,6 +58,8 @@ def multiping( netsize, chunksize, seconds): # Start pings for subnet in subnets: ips = [ host.IP() for host in subnet ] + #adding bogus to generate packet loss + ips.append( '10.0.0.200' ) for host in subnet: startpings( host, ips )