mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 15:01:44 +00:00
tc-testing: add support for sending various scapy packets
It can be worth sending different scapy packets on a given test, as in the last patch of this series. For that, lets listify the scapy attribute and simply iterate over it. Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b4fd096cbb
commit
11f04de902
1 changed files with 22 additions and 18 deletions
|
@ -29,7 +29,11 @@ class SubPlugin(TdcPlugin):
|
|||
return
|
||||
|
||||
# Check for required fields
|
||||
scapyinfo = self.args.caseinfo['scapy']
|
||||
lscapyinfo = self.args.caseinfo['scapy']
|
||||
if type(lscapyinfo) != list:
|
||||
lscapyinfo = [ lscapyinfo, ]
|
||||
|
||||
for scapyinfo in lscapyinfo:
|
||||
scapy_keys = ['iface', 'count', 'packet']
|
||||
missing_keys = []
|
||||
keyfail = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue