Make sure that all VLANs will be checked at least once
Change-Id: I5ea5a0c4d141072cfce058df141c8846cc9a327a Closes-bug: #1397140
This commit is contained in:
parent
a63cb20bab
commit
6f8ff912a2
|
@ -20,7 +20,6 @@
|
|||
# Analyse dumps for packets with special cookie in UDP payload.
|
||||
#
|
||||
import argparse
|
||||
import itertools
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
|
@ -369,13 +368,13 @@ class Sender(Actor):
|
|||
|
||||
def _send_packets(self):
|
||||
start_time = time.time()
|
||||
for iface, vlan in itertools.cycle(self._iface_vlan_iterator()):
|
||||
self.logger.debug("Sending packets: iface=%s vlan=%s",
|
||||
iface, str(vlan))
|
||||
for _ in xrange(self.config['repeat']):
|
||||
self._sendp(iface, vlan)
|
||||
if time.time() - start_time >= self.config['duration']:
|
||||
break
|
||||
|
||||
while time.time() - start_time <= self.config['duration']:
|
||||
for iface, vlan in self._iface_vlan_iterator():
|
||||
self.logger.debug("Sending packets: iface=%s vlan=%s",
|
||||
iface, str(vlan))
|
||||
for _ in xrange(self.config['repeat']):
|
||||
self._sendp(iface, vlan)
|
||||
|
||||
def _sendp(self, iface, vlan):
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue