Skip to content

packet.time_sent can't be set because of object copy during list comprehension #1199

@polybassa

Description

@polybassa

tobesent = [p for p in pkt]

Is this list comprehension necessary at this position? Without a list comprehension, the time_sent values in the objects to be sent will be propagated to the original object. Because of the deep copy in the list comprehension, the time_sent is only set in a temporary object and not in the original object. This applies for all sr and sr1 function calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions