Skip to content

Sending a raw IP packet drops some fields from original IP header #1095

Description

@jeff-moon

When sending an IP packet using a raw socket, the dispatch function in src/socket/raw.rs is called. This function parses the outgoing IP header into an Ipv4Repr to ensure its a valid packet, and then rebuilds that header using emit. Since Ipv4Repr is missing some fields (for example, ECN), any values that were set in the original header are dropped when the Ipv4Repr is rebuilt into the outgoing header. I imagine similar behavior exists for Ipv6Repr, but haven't investigated further.

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