Skip to content

how to deal with fragment? #41

Open

Description

@rhoninzhang

Hey, it's a great job, I can modify data in net transmission with it, but if the package more than 1460 bytes, it will be fragmented due to IP MTU.

Since the complete message was packed via private protocol, the fragment can't be parsed and modified, is any method for caching fragment in netfilterqueue and send after repackaging, or could you please give any suggestion? Many thanks in advance.

Activity

  1. mattfox commented on Jun 21, 2018

    @mattfox
    Collaborator

    Netfilterqueue doesn't reassemble packets itself.

    Suggestions:

    1. Keep your own cache of IP fragments received, and implement something such as https://tools.ietf.org/html/rfc815 to re-assemble them. When you have a full packet, send from Python. But you won't be using set_payload for this, as you will be sending a brand new packet.
    2. Investigate if your network card supports and has enabled large receive offload/generic receive offload and if that might solve the problem for you. Try ethtool -k eth0 | grep offload to see your interface settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions