node_pcap
node_pcap copied to clipboard
IPv4 fragments reassembly and correction for decode invalid values on fragments (issue #173)
I was unable to check content of fragmented packets, and trying decode packets that are fragments make wrong headers in transport layer. Addictionally, before this commit was impossible to manual merge fragments to reassembly the original payload of ip fragments, due to the fact the bytes were lost because was handled like a header, when just the first fragment has a transport layer header.
I think handling this case is a good idea. However, I would like to see a couple changes prior to accepting this into master.
- Move sample programs to external repository you maintain. (Which we will link to from the readme)
- Add a test for this case, if it is worth adding this functionality today it is worth making sure it works tomorrow.
- Introduce a IPv4Fragment decoder which raises an event on an ipv4 fragment. (This way the payload of the ipv4 packet is an ipv4 fragment. The example app does not have to inspect all packets to find fragments)
Finally, thank you work the work you have put into this so far.
Hi there. Thanks for the contribution. I've added you as a collaborator on this project. Feel free to continue development and merge as you see fit.