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.
|
# Analyse dumps for packets with special cookie in UDP payload.
|
||||||
#
|
#
|
||||||
import argparse
|
import argparse
|
||||||
import itertools
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
@ -369,13 +368,13 @@ class Sender(Actor):
|
||||||
|
|
||||||
def _send_packets(self):
|
def _send_packets(self):
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
for iface, vlan in itertools.cycle(self._iface_vlan_iterator()):
|
|
||||||
self.logger.debug("Sending packets: iface=%s vlan=%s",
|
while time.time() - start_time <= self.config['duration']:
|
||||||
iface, str(vlan))
|
for iface, vlan in self._iface_vlan_iterator():
|
||||||
for _ in xrange(self.config['repeat']):
|
self.logger.debug("Sending packets: iface=%s vlan=%s",
|
||||||
self._sendp(iface, vlan)
|
iface, str(vlan))
|
||||||
if time.time() - start_time >= self.config['duration']:
|
for _ in xrange(self.config['repeat']):
|
||||||
break
|
self._sendp(iface, vlan)
|
||||||
|
|
||||||
def _sendp(self, iface, vlan):
|
def _sendp(self, iface, vlan):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue