if there are no interfaces to ping, there are no packets sent
This commit is contained in:
+5
-2
@@ -562,8 +562,11 @@ class Mininet( object ):
|
|||||||
opts = ''
|
opts = ''
|
||||||
if timeout:
|
if timeout:
|
||||||
opts = '-W %s' % timeout
|
opts = '-W %s' % timeout
|
||||||
result = node.cmd( 'ping -c1 %s %s' % (opts, dest.IP()) )
|
if dest.intfs:
|
||||||
sent, received = self._parsePing( result )
|
result = node.cmd( 'ping -c1 %s %s' % (opts, dest.IP()) )
|
||||||
|
sent, received = self._parsePing( result )
|
||||||
|
else:
|
||||||
|
sent, received = 0, 0
|
||||||
packets += sent
|
packets += sent
|
||||||
if received > sent:
|
if received > sent:
|
||||||
error( '*** Error: received too many packets' )
|
error( '*** Error: received too many packets' )
|
||||||
|
|||||||
Reference in New Issue
Block a user