Skip to content

Commit

Permalink
External.TRex.UDPSimple: use src/dst mac and ip addresses
Browse files Browse the repository at this point in the history
The default trex packet stream generator didn't correctly use the
provided source and destination ip and mac addresses.

This wasn't noticed until now because the test is typically run in a
lab where multiple machine pairs were isolated from eachother.

This however isn't MANDATORY and so to avoid conflicts on a shared
network we should respect the provided values.

Signed-off-by: Ondrej Lichtner <[email protected]>
  • Loading branch information
olichtne committed Feb 22, 2024
1 parent 28d0e16 commit f64f845
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lnst/External/TRex/UDPSimple.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def _import_optionals():

def create_stream (self, **kwargs):
# Use port's configured mac and ip addresses
L2 = Ether()
L3 = IP()
L2 = Ether(src=kwargs["src_mac"], dst=kwargs["dst_mac"])
L3 = IP(src=kwargs["src_ip"], dst=kwargs["dst_ip"])
L4 = UDP()

size = kwargs.get("msg_size", 64)
Expand Down

0 comments on commit f64f845

Please sign in to comment.